SungBeom commited on
Commit
32213e2
โ€ข
1 Parent(s): 0226088

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
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
- # 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,11 +785,11 @@ with gr.Blocks(css='#chatbot .overflow-y-auto{height:750px}') as demo:
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()
 
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()