Spaces:
Sleeping
Sleeping
send_question delete
Browse files
app.py
CHANGED
@@ -613,11 +613,6 @@ def change_questions(df_string):
|
|
613 |
print("=====get_questions=====")
|
614 |
return q1, q2, q3
|
615 |
|
616 |
-
|
617 |
-
def send_question(question, df_string_output, chat_history):
|
618 |
-
# 当问题按钮被点击时调用此函数
|
619 |
-
return respond(question, df_string_output, chat_history)
|
620 |
-
|
621 |
def respond(user_message, df_string_output, chat_history, socratic_mode=False):
|
622 |
print("=== 變數:user_message ===")
|
623 |
print(user_message)
|
@@ -788,9 +783,9 @@ with gr.Blocks() as demo:
|
|
788 |
outputs=[msg, chatbot]
|
789 |
)
|
790 |
# 连接按钮点击事件
|
791 |
-
btn_1.click(respond, inputs=[btn_1, df_string_output, chatbot], outputs=[msg, chatbot])
|
792 |
-
btn_2.click(respond, inputs=[btn_2, df_string_output, chatbot], outputs=[msg, chatbot])
|
793 |
-
btn_3.click(respond, inputs=[btn_3, df_string_output, chatbot], outputs=[msg, chatbot])
|
794 |
|
795 |
btn_create_question.click(change_questions, inputs = [df_string_output], outputs = [btn_1, btn_2, btn_3])
|
796 |
|
|
|
613 |
print("=====get_questions=====")
|
614 |
return q1, q2, q3
|
615 |
|
|
|
|
|
|
|
|
|
|
|
616 |
def respond(user_message, df_string_output, chat_history, socratic_mode=False):
|
617 |
print("=== 變數:user_message ===")
|
618 |
print(user_message)
|
|
|
783 |
outputs=[msg, chatbot]
|
784 |
)
|
785 |
# 连接按钮点击事件
|
786 |
+
btn_1.click(respond, inputs=[btn_1, df_string_output, chatbot, socratic_mode_btn], outputs=[msg, chatbot])
|
787 |
+
btn_2.click(respond, inputs=[btn_2, df_string_output, chatbot, socratic_mode_btn], outputs=[msg, chatbot])
|
788 |
+
btn_3.click(respond, inputs=[btn_3, df_string_output, chatbot, socratic_mode_btn], outputs=[msg, chatbot])
|
789 |
|
790 |
btn_create_question.click(change_questions, inputs = [df_string_output], outputs = [btn_1, btn_2, btn_3])
|
791 |
|