SungBeom commited on
Commit
77c5c64
โ€ข
1 Parent(s): 9a7116f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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(user_response_examples):
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])