derful commited on
Commit
a64459f
1 Parent(s): d1cdb25

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -87,12 +87,12 @@ with gr.Blocks(theme=set_theme, analytics_enabled=False) as demo:
87
  resetBtn.click(lambda: ([], [], "已重置"), None, [chatbot, history, statusDisplay])
88
  for k in functional:
89
  click_handle = functional[k]["Button"].click(predict,
90
- [txt, top_p, temperature, chatbot, history, system_prompt, gr.State(True), gr.State(k)], [chatbot, history, statusDisplay], show_progress=True)
91
  cancel_handles.append(click_handle)
92
  file_upload.upload(on_file_uploaded, [file_upload, chatbot, txt], [chatbot, txt])
93
  for k in crazy_functional:
94
  click_handle = crazy_functional[k]["Button"].click(crazy_functional[k]["Function"],
95
- [txt, top_p, temperature, chatbot, history, system_prompt, gr.State(PORT)], [chatbot, history, statusDisplay]
96
  )
97
  try: click_handle.then(on_report_generated, [file_upload, chatbot], [file_upload, chatbot])
98
  except: pass
 
87
  resetBtn.click(lambda: ([], [], "已重置"), None, [chatbot, history, statusDisplay])
88
  for k in functional:
89
  click_handle = functional[k]["Button"].click(predict,
90
+ [api, txt, top_p, temperature, chatbot, history, system_prompt, gr.State(True), gr.State(k)], [chatbot, history, statusDisplay], show_progress=True)
91
  cancel_handles.append(click_handle)
92
  file_upload.upload(on_file_uploaded, [file_upload, chatbot, txt], [chatbot, txt])
93
  for k in crazy_functional:
94
  click_handle = crazy_functional[k]["Button"].click(crazy_functional[k]["Function"],
95
+ [api, txt, top_p, temperature, chatbot, history, system_prompt, gr.State(PORT)], [chatbot, history, statusDisplay]
96
  )
97
  try: click_handle.then(on_report_generated, [file_upload, chatbot], [file_upload, chatbot])
98
  except: pass