baudm commited on
Commit
42e25a0
1 Parent(s): 35a42b7

Remove toggle for detailed output

Browse files

A new processing step is triggered every time the output visibility is changed.
Just show the raw output always even if it is empty.

Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -87,12 +87,12 @@ def main():
87
  read_canvas = gr.Button('Read Text')
88
 
89
  output = gr.Textbox(max_lines=1, label='Model output')
90
- adv_output = gr.Checkbox(label='Show detailed output')
91
- raw_output = gr.Dataframe(row_count=2, col_count=0, label='Raw output with confidence values ([0, 1] interval; [B] - BLANK token; [E] - EOS token)', visible=False)
92
 
93
  read_upload.click(app, inputs=[model_name, image_upload], outputs=[output, raw_output])
94
  read_canvas.click(app, inputs=[model_name, image_canvas], outputs=[output, raw_output])
95
- adv_output.change(lambda x: gr.update(visible=x), inputs=adv_output, outputs=raw_output)
96
 
97
  demo.launch()
98
 
 
87
  read_canvas = gr.Button('Read Text')
88
 
89
  output = gr.Textbox(max_lines=1, label='Model output')
90
+ #adv_output = gr.Checkbox(label='Show detailed output')
91
+ raw_output = gr.Dataframe(row_count=2, col_count=0, label='Raw output with confidence values ([0, 1] interval; [B] - BLANK token; [E] - EOS token)')
92
 
93
  read_upload.click(app, inputs=[model_name, image_upload], outputs=[output, raw_output])
94
  read_canvas.click(app, inputs=[model_name, image_canvas], outputs=[output, raw_output])
95
+ #adv_output.change(lambda x: gr.update(visible=x), inputs=adv_output, outputs=raw_output)
96
 
97
  demo.launch()
98