Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -689,7 +689,7 @@ with gr.Blocks(css='#chatbot .overflow-y-auto{height:750px}') as demo:
|
|
689 |
user_response_examples = gr.Dataset(samples=[["์ด๋ฒ ์ฃผ์ ์น๊ตฌ๋ค๊ณผ ๋ชจ์์ด ์๋๋ฐ, ํ๋ฅญํ ์์ธ ํ ๋ณ์ ์ถ์ฒํด์ค๋?"], ["์
๋ฌธ์์๊ฒ ์ข์ ์์ธ์ ์ถ์ฒํด์ค๋?"], ["์ฐ์ธ๊ณผ ๊ฐ๊ธฐ ์ข์ ์์ธ๋ฐ๋ฅผ ์๋ ค์ค"]], components=[msg], type="index")
|
690 |
clear_btn = gr.ClearButton([msg, chatbot])
|
691 |
|
692 |
-
dev_mod =
|
693 |
cur_stage = gr.Textbox(visible=dev_mod, interactive=False, label='current_stage')
|
694 |
stage_hist = gr.Textbox(visible=dev_mod, value="stage history: ", interactive=False, label='stage history')
|
695 |
chat_hist = gr.Textbox(visible=dev_mod, interactive=False, label='chatting_history')
|
@@ -765,9 +765,10 @@ with gr.Blocks(css='#chatbot .overflow-y-auto{height:750px}') as demo:
|
|
765 |
bot_chat, [msg, chat_hist, chatbot, cur_stage], [chatbot, chat_hist]
|
766 |
).then(
|
767 |
bot_response_pred, chat_hist, [user_response_examples, response_examples_text, msg]
|
768 |
-
).then(
|
769 |
-
click_flag_btn, [chat_hist, stage_hist, response_examples_text], None
|
770 |
)
|
|
|
|
|
|
|
771 |
|
772 |
|
773 |
|
@@ -779,9 +780,10 @@ with gr.Blocks(css='#chatbot .overflow-y-auto{height:750px}') as demo:
|
|
779 |
bot_chat, [msg, chat_hist, chatbot, cur_stage], [chatbot, chat_hist]
|
780 |
).then(
|
781 |
bot_response_pred, chat_hist, [user_response_examples, response_examples_text, msg]
|
782 |
-
).then(
|
783 |
-
click_flag_btn, [chat_hist, stage_hist, response_examples_text], None
|
784 |
)
|
|
|
|
|
|
|
785 |
|
786 |
|
787 |
|
|
|
689 |
user_response_examples = gr.Dataset(samples=[["์ด๋ฒ ์ฃผ์ ์น๊ตฌ๋ค๊ณผ ๋ชจ์์ด ์๋๋ฐ, ํ๋ฅญํ ์์ธ ํ ๋ณ์ ์ถ์ฒํด์ค๋?"], ["์
๋ฌธ์์๊ฒ ์ข์ ์์ธ์ ์ถ์ฒํด์ค๋?"], ["์ฐ์ธ๊ณผ ๊ฐ๊ธฐ ์ข์ ์์ธ๋ฐ๋ฅผ ์๋ ค์ค"]], components=[msg], type="index")
|
690 |
clear_btn = gr.ClearButton([msg, chatbot])
|
691 |
|
692 |
+
dev_mod = False
|
693 |
cur_stage = gr.Textbox(visible=dev_mod, interactive=False, label='current_stage')
|
694 |
stage_hist = gr.Textbox(visible=dev_mod, value="stage history: ", interactive=False, label='stage history')
|
695 |
chat_hist = gr.Textbox(visible=dev_mod, interactive=False, label='chatting_history')
|
|
|
765 |
bot_chat, [msg, chat_hist, chatbot, cur_stage], [chatbot, chat_hist]
|
766 |
).then(
|
767 |
bot_response_pred, chat_hist, [user_response_examples, response_examples_text, msg]
|
|
|
|
|
768 |
)
|
769 |
+
# .then(
|
770 |
+
# click_flag_btn, [chat_hist, stage_hist, response_examples_text], None
|
771 |
+
# )
|
772 |
|
773 |
|
774 |
|
|
|
780 |
bot_chat, [msg, chat_hist, chatbot, cur_stage], [chatbot, chat_hist]
|
781 |
).then(
|
782 |
bot_response_pred, chat_hist, [user_response_examples, response_examples_text, msg]
|
|
|
|
|
783 |
)
|
784 |
+
# .then(
|
785 |
+
# click_flag_btn, [chat_hist, stage_hist, response_examples_text], None
|
786 |
+
# )
|
787 |
|
788 |
|
789 |
|