Update app.py
Browse files
app.py
CHANGED
@@ -113,7 +113,7 @@ with gr.Blocks(css=css, title="家庭医生AI助手") as iface:
|
|
113 |
submit_btn = gr.Button("🚀 确认") # Create a submit button
|
114 |
clear_btn = gr.ClearButton([output_box,image_input,text_input], value="🗑️ 清空") # Create a clear button
|
115 |
|
116 |
-
def update(
|
117 |
if json_path:
|
118 |
job = client.submit(
|
119 |
json_path,
|
@@ -127,7 +127,7 @@ with gr.Blocks(css=css, title="家庭医生AI助手") as iface:
|
|
127 |
else:
|
128 |
return
|
129 |
# Set up the event listeners
|
130 |
-
submit_btn.click(main, inputs=[text_input, image_input, unit], outputs=output_box).
|
131 |
gr.Markdown(LICENSE)
|
132 |
|
133 |
#gr.close_all()
|
|
|
113 |
submit_btn = gr.Button("🚀 确认") # Create a submit button
|
114 |
clear_btn = gr.ClearButton([output_box,image_input,text_input], value="🗑️ 清空") # Create a clear button
|
115 |
|
116 |
+
def update():
|
117 |
if json_path:
|
118 |
job = client.submit(
|
119 |
json_path,
|
|
|
127 |
else:
|
128 |
return
|
129 |
# Set up the event listeners
|
130 |
+
submit_btn.click(main, inputs=[text_input, image_input, unit], outputs=output_box).then(update)
|
131 |
gr.Markdown(LICENSE)
|
132 |
|
133 |
#gr.close_all()
|