Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -274,7 +274,7 @@ with gr.Blocks(css='#chatbot .overflow-y-auto{height:750px}') as demo:
|
|
274 |
user_response_examples = gr.Dataset(samples=samples, components=[msg], type="index")
|
275 |
stage_history = gr.Textbox(value="stage history: ", interactive=False, label='stage history')
|
276 |
submit_btn = gr.Button("์ ์ก")
|
277 |
-
clear_btn = gr.ClearButton([msg, chatbot
|
278 |
stage_info = gr.Textbox(value=stage_description, interactive=False, label='stage description')
|
279 |
|
280 |
def load_example(example_id):
|
@@ -311,7 +311,7 @@ with gr.Blocks(css='#chatbot .overflow-y-auto{height:750px}') as demo:
|
|
311 |
samples = [["์ด๋ฒ ์ฃผ์ ์น๊ตฌ๋ค๊ณผ ๋ชจ์์ด ์๋๋ฐ, ํ๋ฅญํ ์์ธ ํ ๋ณ์ ์ถ์ฒํด์ค๋?"], ["์
๋ฌธ์์๊ฒ ์ข์ ์์ธ์ ์ถ์ฒํด์ค๋?"], ["๋ณด๋ฅด๋์ ๋ถ๋ฅด๊ณ ๋ด ์์ธ์ ์ฐจ์ด์ ์ ๋ญ์ผ?"]]
|
312 |
return gr.Dataset.update(samples=samples)
|
313 |
|
314 |
-
clear_btn.click(fn=clear, inputs=[user_response_examples], outputs=[user_response_examples])
|
315 |
user_response_examples.click(load_example, inputs=[user_response_examples], outputs=[msg])
|
316 |
submit_btn.click(answer, [msg, chatbot, stage_history], [msg, chatbot, stage_history, user_response_examples])
|
317 |
msg.submit(answer, [msg, chatbot, stage_history], [msg, chatbot, stage_history, user_response_examples])
|
|
|
274 |
user_response_examples = gr.Dataset(samples=samples, components=[msg], type="index")
|
275 |
stage_history = gr.Textbox(value="stage history: ", interactive=False, label='stage history')
|
276 |
submit_btn = gr.Button("์ ์ก")
|
277 |
+
clear_btn = gr.ClearButton([msg, chatbot])
|
278 |
stage_info = gr.Textbox(value=stage_description, interactive=False, label='stage description')
|
279 |
|
280 |
def load_example(example_id):
|
|
|
311 |
samples = [["์ด๋ฒ ์ฃผ์ ์น๊ตฌ๋ค๊ณผ ๋ชจ์์ด ์๋๋ฐ, ํ๋ฅญํ ์์ธ ํ ๋ณ์ ์ถ์ฒํด์ค๋?"], ["์
๋ฌธ์์๊ฒ ์ข์ ์์ธ์ ์ถ์ฒํด์ค๋?"], ["๋ณด๋ฅด๋์ ๋ถ๋ฅด๊ณ ๋ด ์์ธ์ ์ฐจ์ด์ ์ ๋ญ์ผ?"]]
|
312 |
return gr.Dataset.update(samples=samples)
|
313 |
|
314 |
+
clear_btn.click(fn=clear, inputs=[user_response_examples, stage_history], outputs=[user_response_examples, stage_history])
|
315 |
user_response_examples.click(load_example, inputs=[user_response_examples], outputs=[msg])
|
316 |
submit_btn.click(answer, [msg, chatbot, stage_history], [msg, chatbot, stage_history, user_response_examples])
|
317 |
msg.submit(answer, [msg, chatbot, stage_history], [msg, chatbot, stage_history, user_response_examples])
|