artificialguybr commited on
Commit
c051fb4
·
verified ·
1 Parent(s): cb4c132

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -106,7 +106,10 @@ with gr.Blocks() as demo:
106
  clear_btn="🗑️ Clear",
107
  )
108
 
109
- # Corrected clear button assignment:
110
- chatbot.clear(outputs=[chat_history_state, chatbot.textbox])
 
 
 
111
 
112
  demo.launch()
 
106
  clear_btn="🗑️ Clear",
107
  )
108
 
109
+ def clear_chat():
110
+ chat_history_state.value = []
111
+ chatbot.textbox.value = ""
112
+
113
+ chatbot.clear()
114
 
115
  demo.launch()