ttagu99 commited on
Commit
3f5c67e
Β·
1 Parent(s): 42175aa

add textbox clear

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -140,6 +140,9 @@ with gr.Blocks() as demo:
140
  clear = gr.Button("상담 μƒˆλ‘œ μ‹œμž‘")
141
  txt.submit(predict, inputs=[txt, chatbot, state], outputs=[chatbot, state]
142
  )
 
143
  clear.click(lambda: None, None, chatbot, queue=False)
 
 
144
  demo.launch()
145
 
 
140
  clear = gr.Button("상담 μƒˆλ‘œ μ‹œμž‘")
141
  txt.submit(predict, inputs=[txt, chatbot, state], outputs=[chatbot, state]
142
  )
143
+ txt.submit(lambda x: "", txt, txt)
144
  clear.click(lambda: None, None, chatbot, queue=False)
145
+ clear.click(lambda x: "", txt, txt)
146
+
147
  demo.launch()
148