From 1f6defedfc0c9bbf8904f1b35a0585a573b5f7e1 Mon Sep 17 00:00:00 2001 From: qingxu fu <505030475@qq.com> Date: Sun, 9 Apr 2023 20:50:33 +0800 Subject: [PATCH] UP --- main.py | 4 ++-- toolbox.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 1520761..52f6d02 100644 --- a/main.py +++ b/main.py @@ -126,8 +126,8 @@ with gr.Blocks(title="ChatGPT 学术优化", theme=set_theme, analytics_enabled= cancel_handles.append(txt2.submit(**predict_args)) cancel_handles.append(submitBtn.click(**predict_args)) cancel_handles.append(submitBtn2.click(**predict_args)) - resetBtn.click(lambda: ([], [], "已重置"), None, output_combo) - resetBtn2.click(lambda: ([], [], "已重置"), None, output_combo) + resetBtn.click(lambda: ([], [], "已重置"), None, [chatbot, history, status]) + resetBtn2.click(lambda: ([], [], "已重置"), None, [chatbot, history, status]) # 基础功能区的回调函数注册 for k in functional: click_handle = functional[k]["Button"].click(fn=ArgsGeneralWrapper(predict), inputs=[*input_combo, gr.State(True), gr.State(k)], outputs=output_combo) diff --git a/toolbox.py b/toolbox.py index a4d9684..e2c53be 100644 --- a/toolbox.py +++ b/toolbox.py @@ -43,7 +43,7 @@ def ArgsGeneralWrapper(f): plugin_kwargs = { } chatbot_with_cookie = ChatBotWithCookies(cookies) - chatbot_with_cookie.write_list(txt_passon) + chatbot_with_cookie.write_list(chatbot) yield from f(txt_passon, llm_kwargs, plugin_kwargs, chatbot_with_cookie, history, system_prompt, *args) return decorated