Spaces:
Running
Running
Update main.py
Browse files
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
|