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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -689,7 +689,7 @@ with gr.Blocks(css='#chatbot .overflow-y-auto{height:750px}') as demo:
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')
694
  stage_hist = gr.Textbox(visible=dev_mod, value="stage history: ", interactive=False, label='stage history')
695
  chat_hist = gr.Textbox(visible=dev_mod, interactive=False, label='chatting_history')
@@ -765,9 +765,10 @@ with gr.Blocks(css='#chatbot .overflow-y-auto{height:750px}') as demo:
765
  bot_chat, [msg, chat_hist, chatbot, cur_stage], [chatbot, chat_hist]
766
  ).then(
767
  bot_response_pred, chat_hist, [user_response_examples, response_examples_text, msg]
768
- ).then(
769
- click_flag_btn, [chat_hist, stage_hist, response_examples_text], None
770
  )
 
 
 
771
 
772
 
773
 
@@ -779,9 +780,10 @@ with gr.Blocks(css='#chatbot .overflow-y-auto{height:750px}') as demo:
779
  bot_chat, [msg, chat_hist, chatbot, cur_stage], [chatbot, chat_hist]
780
  ).then(
781
  bot_response_pred, chat_hist, [user_response_examples, response_examples_text, msg]
782
- ).then(
783
- click_flag_btn, [chat_hist, stage_hist, response_examples_text], None
784
  )
 
 
 
785
 
786
 
787
 
 
689
  user_response_examples = gr.Dataset(samples=[["์ด๋ฒˆ ์ฃผ์— ์นœ๊ตฌ๋“ค๊ณผ ๋ชจ์ž„์ด ์žˆ๋Š”๋ฐ, ํ›Œ๋ฅญํ•œ ์™€์ธ ํ•œ ๋ณ‘์„ ์ถ”์ฒœํ•ด์ค„๋ž˜?"], ["์ž…๋ฌธ์ž์—๊ฒŒ ์ข‹์€ ์™€์ธ์„ ์ถ”์ฒœํ•ด์ค„๋ž˜?"], ["์—ฐ์ธ๊ณผ ๊ฐ€๊ธฐ ์ข‹์€ ์™€์ธ๋ฐ”๋ฅผ ์•Œ๋ ค์ค˜"]], components=[msg], type="index")
690
  clear_btn = gr.ClearButton([msg, chatbot])
691
 
692
+ dev_mod = False
693
  cur_stage = gr.Textbox(visible=dev_mod, interactive=False, label='current_stage')
694
  stage_hist = gr.Textbox(visible=dev_mod, value="stage history: ", interactive=False, label='stage history')
695
  chat_hist = gr.Textbox(visible=dev_mod, interactive=False, label='chatting_history')
 
765
  bot_chat, [msg, chat_hist, chatbot, cur_stage], [chatbot, chat_hist]
766
  ).then(
767
  bot_response_pred, chat_hist, [user_response_examples, response_examples_text, msg]
 
 
768
  )
769
+ # .then(
770
+ # click_flag_btn, [chat_hist, stage_hist, response_examples_text], None
771
+ # )
772
 
773
 
774
 
 
780
  bot_chat, [msg, chat_hist, chatbot, cur_stage], [chatbot, chat_hist]
781
  ).then(
782
  bot_response_pred, chat_hist, [user_response_examples, response_examples_text, msg]
 
 
783
  )
784
+ # .then(
785
+ # click_flag_btn, [chat_hist, stage_hist, response_examples_text], None
786
+ # )
787
 
788
 
789