orrinin commited on
Commit
31a5408
·
verified ·
1 Parent(s): 6e5a5ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -120,7 +120,7 @@ with gr.Blocks(css=css, title="家庭医生AI助手") as iface:
120
  "整形美容科", "营养科", "生殖中心", "麻醉医学科", "医学影像科", \
121
  "骨科", "肿瘤科", "急诊科", "检验科"])
122
  with gr.Row():
123
- output_box = gr.Markdown(value=result, every=10, label="分析").change(fn=fetch_result)
124
  with gr.Row():
125
  image_input = gr.Image(type="filepath", label="上传图片") # Create an image upload button
126
  text_input = gr.Textbox(label="输入") # Create a text input box
@@ -130,7 +130,7 @@ with gr.Blocks(css=css, title="家庭医生AI助手") as iface:
130
 
131
 
132
  # Set up the event listeners
133
- submit_btn.click(main, inputs=[text_input, image_input, unit])
134
  gr.Markdown(LICENSE)
135
 
136
  #gr.close_all()
 
120
  "整形美容科", "营养科", "生殖中心", "麻醉医学科", "医学影像科", \
121
  "骨科", "肿瘤科", "急诊科", "检验科"])
122
  with gr.Row():
123
+ output_box = gr.Markdown(value=result, every=1, label="分析")
124
  with gr.Row():
125
  image_input = gr.Image(type="filepath", label="上传图片") # Create an image upload button
126
  text_input = gr.Textbox(label="输入") # Create a text input box
 
130
 
131
 
132
  # Set up the event listeners
133
+ submit_btn.click(main, inputs=[text_input, image_input, unit], outputs=output_box).then(output_box.change(fn=fetch_result))
134
  gr.Markdown(LICENSE)
135
 
136
  #gr.close_all()