stzhao commited on
Commit
257fa35
·
verified ·
1 Parent(s): f539c94

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -2
app.py CHANGED
@@ -482,15 +482,26 @@ def create_demo():
482
  current_images = gr.State([])
483
  current_json = gr.State(None)
484
 
 
 
 
 
 
 
 
 
 
 
 
485
  # 处理提交
486
  def handle_submit(model, client_type, key, url, q, img):
487
  html, images, json_data = pyvision_chat(model, client_type, key, url, q, img)
488
- return html, images, json_data, images, json_data
489
 
490
  submit_btn.click(
491
  fn=handle_submit,
492
  inputs=[model_name, client_type, api_key, base_url, question, image_input],
493
- outputs=[output, extracted_images, extracted_json, current_images, current_json]
494
  )
495
 
496
  # # 处理导出
 
482
  current_images = gr.State([])
483
  current_json = gr.State(None)
484
 
485
+ # # 处理提交
486
+ # def handle_submit(model, client_type, key, url, q, img):
487
+ # html, images, json_data = pyvision_chat(model, client_type, key, url, q, img)
488
+ # return html, images, json_data, images, json_data
489
+
490
+ # submit_btn.click(
491
+ # fn=handle_submit,
492
+ # inputs=[model_name, client_type, api_key, base_url, question, image_input],
493
+ # outputs=[output, extracted_images, extracted_json, current_images, current_json]
494
+ # )
495
+
496
  # 处理提交
497
  def handle_submit(model, client_type, key, url, q, img):
498
  html, images, json_data = pyvision_chat(model, client_type, key, url, q, img)
499
+ return html, images, json_data
500
 
501
  submit_btn.click(
502
  fn=handle_submit,
503
  inputs=[model_name, client_type, api_key, base_url, question, image_input],
504
+ outputs=[output, current_images, current_json]
505
  )
506
 
507
  # # 处理导出