not-lain commited on
Commit
2d6f12c
·
1 Parent(s): b3cd315

fix Cannot call click outside of a gradio.Blocks

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -138,17 +138,17 @@ with gr.Blocks() as demo:
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')
 
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')