Spaces:
Runtime error
Runtime error
fix Cannot call click outside of a gradio.Blocks
Browse files
app.py
CHANGED
|
@@ -138,17 +138,17 @@ with gr.Blocks() as demo:
|
|
| 138 |
cache_examples=True,
|
| 139 |
)
|
| 140 |
|
| 141 |
-
submit_button_component.click(
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
)
|
| 152 |
|
| 153 |
# demo.launch(debug=False, show_error=True, share=True)
|
| 154 |
# demo.launch(share=True, server_port=7861, server_name='0.0.0.0')
|
|
|
|
| 138 |
cache_examples=True,
|
| 139 |
)
|
| 140 |
|
| 141 |
+
submit_button_component.click(
|
| 142 |
+
fn=process,
|
| 143 |
+
inputs=[
|
| 144 |
+
image_input_component,
|
| 145 |
+
box_threshold_component,
|
| 146 |
+
iou_threshold_component,
|
| 147 |
+
use_paddleocr_component,
|
| 148 |
+
imgsz_component,
|
| 149 |
+
],
|
| 150 |
+
outputs=[image_output_component, text_output_component],
|
| 151 |
+
)
|
| 152 |
|
| 153 |
# demo.launch(debug=False, show_error=True, share=True)
|
| 154 |
# demo.launch(share=True, server_port=7861, server_name='0.0.0.0')
|