ttagu99 commited on
Commit
6703418
1 Parent(s): 03d0755

state clear

Browse files
Files changed (2) hide show
  1. app.py +2 -0
  2. requirements.txt +1 -3
app.py CHANGED
@@ -142,6 +142,8 @@ with gr.Blocks() as demo:
142
  txt.submit(lambda x: "", txt, txt)
143
  clear.click(lambda: None, None, chatbot, queue=False)
144
  clear.click(lambda x: "", txt, txt)
 
 
145
 
146
  demo.launch()
147
 
 
142
  txt.submit(lambda x: "", txt, txt)
143
  clear.click(lambda: None, None, chatbot, queue=False)
144
  clear.click(lambda x: "", txt, txt)
145
+ # clear 클릭 시 state 초기화
146
+ clear.click(lambda x: [], state, state)
147
 
148
  demo.launch()
149
 
requirements.txt CHANGED
@@ -1,12 +1,10 @@
1
  numpy
2
  rouge_score
3
  fire
4
- openai
5
  git+https://github.com/zphang/transformers.git@68d640f7c368bcaaaecfc678f11908ebbd3d6176
6
  torch
7
  sentencepiece
8
  tokenizers==0.12.1
9
  wandb
10
  accelerate
11
- googletrans==4.0.0-rc1
12
- gradio==3.24.1
 
1
  numpy
2
  rouge_score
3
  fire
 
4
  git+https://github.com/zphang/transformers.git@68d640f7c368bcaaaecfc678f11908ebbd3d6176
5
  torch
6
  sentencepiece
7
  tokenizers==0.12.1
8
  wandb
9
  accelerate
10
+ googletrans==4.0.0-rc1