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

Update app.py

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