Spaces:
Running
Running
UP
Browse files- main.py +2 -2
- toolbox.py +1 -1
main.py
CHANGED
@@ -126,8 +126,8 @@ with gr.Blocks(title="ChatGPT 学术优化", theme=set_theme, analytics_enabled=
|
|
126 |
cancel_handles.append(txt2.submit(**predict_args))
|
127 |
cancel_handles.append(submitBtn.click(**predict_args))
|
128 |
cancel_handles.append(submitBtn2.click(**predict_args))
|
129 |
-
resetBtn.click(lambda: ([], [], "已重置"), None,
|
130 |
-
resetBtn2.click(lambda: ([], [], "已重置"), None,
|
131 |
# 基础功能区的回调函数注册
|
132 |
for k in functional:
|
133 |
click_handle = functional[k]["Button"].click(fn=ArgsGeneralWrapper(predict), inputs=[*input_combo, gr.State(True), gr.State(k)], outputs=output_combo)
|
|
|
126 |
cancel_handles.append(txt2.submit(**predict_args))
|
127 |
cancel_handles.append(submitBtn.click(**predict_args))
|
128 |
cancel_handles.append(submitBtn2.click(**predict_args))
|
129 |
+
resetBtn.click(lambda: ([], [], "已重置"), None, [chatbot, history, status])
|
130 |
+
resetBtn2.click(lambda: ([], [], "已重置"), None, [chatbot, history, status])
|
131 |
# 基础功能区的回调函数注册
|
132 |
for k in functional:
|
133 |
click_handle = functional[k]["Button"].click(fn=ArgsGeneralWrapper(predict), inputs=[*input_combo, gr.State(True), gr.State(k)], outputs=output_combo)
|
toolbox.py
CHANGED
@@ -43,7 +43,7 @@ def ArgsGeneralWrapper(f):
|
|
43 |
plugin_kwargs = {
|
44 |
}
|
45 |
chatbot_with_cookie = ChatBotWithCookies(cookies)
|
46 |
-
chatbot_with_cookie.write_list(
|
47 |
yield from f(txt_passon, llm_kwargs, plugin_kwargs, chatbot_with_cookie, history, system_prompt, *args)
|
48 |
return decorated
|
49 |
|
|
|
43 |
plugin_kwargs = {
|
44 |
}
|
45 |
chatbot_with_cookie = ChatBotWithCookies(cookies)
|
46 |
+
chatbot_with_cookie.write_list(chatbot)
|
47 |
yield from f(txt_passon, llm_kwargs, plugin_kwargs, chatbot_with_cookie, history, system_prompt, *args)
|
48 |
return decorated
|
49 |
|