orrinin commited on
Commit
0775bbf
·
verified ·
1 Parent(s): 2e43bd8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -103,7 +103,6 @@ def process_image(image_input, unit):
103
 
104
  def refresh():
105
  global result
106
- time.sleep(30)
107
  return result
108
 
109
  def reset_result():
@@ -136,8 +135,9 @@ with gr.Blocks(css=css, title="家庭医生AI助手", theme="soft") as iface:
136
  gr.Markdown(LICENSE)
137
 
138
  # Set up the event listeners
139
- submit_btn.click(main, inputs=[text_input, image_input, unit], outputs=output_box)
140
- output_box.change(refresh, outputs=output_box)
 
141
 
142
 
143
  #gr.close_all()
 
103
 
104
  def refresh():
105
  global result
 
106
  return result
107
 
108
  def reset_result():
 
135
  gr.Markdown(LICENSE)
136
 
137
  # Set up the event listeners
138
+ submit_btn.click(main, inputs=[text_input, image_input, unit], outputs=output_box).then(output_box.change(refresh, every= 10, outputs=output_box))
139
+
140
+
141
 
142
 
143
  #gr.close_all()