SysModeler commited on
Commit
c154f1a
·
verified ·
1 Parent(s): 30552bb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -283,8 +283,12 @@ with gr.Blocks(css="""
283
 
284
  state = gr.State(history)
285
 
286
- submit_btn.click(fn=sysml_chatbot, inputs=[msg, state], outputs=[msg, chatbot])
287
- msg.submit(fn=sysml_chatbot, inputs=[msg, state], outputs=[msg, chatbot]) # still supports enter key
 
 
 
 
288
  clear.click(fn=lambda: ([], ""), inputs=None, outputs=[chatbot, msg])
289
 
290
  if __name__ == "__main__":
 
283
 
284
  state = gr.State(history)
285
 
286
+ submit_btn.click(fn=sysml_chatbot, inputs=[msg, state], outputs=["", chatbot])
287
+ msg.submit(fn=sysml_chatbot, inputs=[msg, state], outputs=["", chatbot]) # still supports enter key
288
+
289
+ # submit_btn.click(fn=sysml_chatbot, inputs=[msg, state], outputs=[gr.Textbox.update(value=""), chatbot])
290
+ # msg.submit(fn=sysml_chatbot, inputs=[msg, state], outputs=[gr.Textbox.update(value=""), chatbot])
291
+
292
  clear.click(fn=lambda: ([], ""), inputs=None, outputs=[chatbot, msg])
293
 
294
  if __name__ == "__main__":