Spaces:
Running
Running
Remove toggle for detailed output
Browse filesA new processing step is triggered every time the output visibility is changed.
Just show the raw output always even if it is empty.
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)'
|
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 |
|