Antoine245 commited on
Commit
850fa76
·
1 Parent(s): 78fe79a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -29,8 +29,8 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
29
  chatbot = gr.Chatbot()
30
  msg = gr.Textbox()
31
  btn = gr.Button("Submit",variant="primary")
32
- gr.ClearButton(msg, chatbot)
33
- # clear = gr.Button("Clear")
34
 
35
 
36
  def user(user_message, history):
@@ -56,7 +56,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
56
  bot, chatbot, chatbot
57
  )
58
  response.then(lambda: gr.update(interactive=True), None, [msg], queue=False)
59
- # clear.click(lambda: None, None, chatbot, queue=False)
60
 
61
  demo.queue()
62
  demo.launch()
 
29
  chatbot = gr.Chatbot()
30
  msg = gr.Textbox()
31
  btn = gr.Button("Submit",variant="primary")
32
+ # gr.ClearButton([msg, chatbot])
33
+ clear = gr.Button("Clear")
34
 
35
 
36
  def user(user_message, history):
 
56
  bot, chatbot, chatbot
57
  )
58
  response.then(lambda: gr.update(interactive=True), None, [msg], queue=False)
59
+ clear.click(lambda: None, None, chatbot, queue=False)
60
 
61
  demo.queue()
62
  demo.launch()