orrinin commited on
Commit
88d69c2
·
verified ·
1 Parent(s): 7a5b1df

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -86,7 +86,7 @@ def process_image(image_input, unit):
86
  json_path = res0
87
 
88
  def update():
89
- result = "正在分析..."
90
  job = client.submit(
91
  json_path,
92
  fn_index=1
@@ -99,7 +99,7 @@ def process_image(image_input, unit):
99
 
100
  threading.Thread(target=update).start()
101
 
102
- return "等待分析..."
103
 
104
  def refresh():
105
  global result
@@ -137,7 +137,7 @@ with gr.Blocks(css=css, title="家庭医生AI助手", theme="soft") as iface:
137
 
138
  # Set up the event listeners
139
  submit_btn.click(main, inputs=[text_input, image_input, unit], outputs=output_box)
140
- submit_btn.click(refresh, every=10, outputs=output_box)
141
 
142
 
143
  #gr.close_all()
 
86
  json_path = res0
87
 
88
  def update():
89
+ result = "正在分析....."
90
  job = client.submit(
91
  json_path,
92
  fn_index=1
 
99
 
100
  threading.Thread(target=update).start()
101
 
102
+ return "正在分析..."
103
 
104
  def refresh():
105
  global result
 
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, every=10, outputs=output_box)
141
 
142
 
143
  #gr.close_all()