Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -306,10 +306,10 @@ with gr.Blocks(css='#chatbot .overflow-y-auto{height:750px}') as demo:
|
|
306 |
|
307 |
return "", chat_history, stage_history, gr.Dataset.update(samples=samples)
|
308 |
|
309 |
-
def clear(
|
310 |
global samples
|
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])
|
|
|
306 |
|
307 |
return "", chat_history, stage_history, gr.Dataset.update(samples=samples)
|
308 |
|
309 |
+
def clear(*args):
|
310 |
global samples
|
311 |
samples = [["์ด๋ฒ ์ฃผ์ ์น๊ตฌ๋ค๊ณผ ๋ชจ์์ด ์๋๋ฐ, ํ๋ฅญํ ์์ธ ํ ๋ณ์ ์ถ์ฒํด์ค๋?"], ["์
๋ฌธ์์๊ฒ ์ข์ ์์ธ์ ์ถ์ฒํด์ค๋?"], ["๋ณด๋ฅด๋์ ๋ถ๋ฅด๊ณ ๋ด ์์ธ์ ์ฐจ์ด์ ์ ๋ญ์ผ?"]]
|
312 |
+
return gr.Dataset.update(samples=samples), "stage history: "
|
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])
|