Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -687,7 +687,7 @@ with gr.Blocks(css='#chatbot .overflow-y-auto{height:750px}') as demo:
|
|
687 |
submit_btn = gr.Button("์ ์ก")
|
688 |
|
689 |
user_response_examples = gr.Dataset(samples=[["์ด๋ฒ ์ฃผ์ ์น๊ตฌ๋ค๊ณผ ๋ชจ์์ด ์๋๋ฐ, ํ๋ฅญํ ์์ธ ํ ๋ณ์ ์ถ์ฒํด์ค๋?"], ["์
๋ฌธ์์๊ฒ ์ข์ ์์ธ์ ์ถ์ฒํด์ค๋?"], ["์ฐ์ธ๊ณผ ๊ฐ๊ธฐ ์ข์ ์์ธ๋ฐ๋ฅผ ์๋ ค์ค"]], components=[msg], type="index")
|
690 |
-
|
691 |
|
692 |
dev_mod = True
|
693 |
cur_stage = gr.Textbox(visible=dev_mod, interactive=False, label='current_stage')
|
@@ -785,11 +785,11 @@ with gr.Blocks(css='#chatbot .overflow-y-auto{height:750px}') as demo:
|
|
785 |
|
786 |
|
787 |
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
user_response_examples.click(load_example, inputs=[response_examples_text, user_response_examples], outputs=[msg], queue=False)
|
794 |
demo.queue(concurrency_count=100)
|
795 |
demo.launch()
|
|
|
687 |
submit_btn = gr.Button("์ ์ก")
|
688 |
|
689 |
user_response_examples = gr.Dataset(samples=[["์ด๋ฒ ์ฃผ์ ์น๊ตฌ๋ค๊ณผ ๋ชจ์์ด ์๋๋ฐ, ํ๋ฅญํ ์์ธ ํ ๋ณ์ ์ถ์ฒํด์ค๋?"], ["์
๋ฌธ์์๊ฒ ์ข์ ์์ธ์ ์ถ์ฒํด์ค๋?"], ["์ฐ์ธ๊ณผ ๊ฐ๊ธฐ ์ข์ ์์ธ๋ฐ๋ฅผ ์๋ ค์ค"]], components=[msg], type="index")
|
690 |
+
clear_btn = gr.ClearButton([msg, chatbot])
|
691 |
|
692 |
dev_mod = True
|
693 |
cur_stage = gr.Textbox(visible=dev_mod, interactive=False, label='current_stage')
|
|
|
785 |
|
786 |
|
787 |
|
788 |
+
clear_btn.click(
|
789 |
+
clean,
|
790 |
+
inputs=[user_response_examples, cur_stage, stage_hist, chat_hist, response_examples_text],
|
791 |
+
outputs=[user_response_examples, cur_stage, stage_hist, chat_hist, response_examples_text],
|
792 |
+
queue=False)
|
793 |
user_response_examples.click(load_example, inputs=[response_examples_text, user_response_examples], outputs=[msg], queue=False)
|
794 |
demo.queue(concurrency_count=100)
|
795 |
demo.launch()
|