Royrotem100 commited on
Commit
4e6a827
·
1 Parent(s): 33ef101

Fix return values in respond function

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -151,11 +151,11 @@ with gr.Blocks(css='''
151
  print(f"Query: {query}") # Debug print statement
152
  response, history = model_chat(query, history)
153
  print(f"Response: {response}") # Debug print statement
154
- return history, gr.update(value="", interactive=True)
155
 
156
  demo_state = gr.State([])
157
 
158
  query.submit(respond, [query, demo_state], [chatbot, query, demo_state])
159
- clear_btn.click(clear_session, [], demo_state, chatbot)
160
 
161
- demo.launch()
 
151
  print(f"Query: {query}") # Debug print statement
152
  response, history = model_chat(query, history)
153
  print(f"Response: {response}") # Debug print statement
154
+ return history, gr.update(value="", interactive=True), history # Ensure correct return format
155
 
156
  demo_state = gr.State([])
157
 
158
  query.submit(respond, [query, demo_state], [chatbot, query, demo_state])
159
+ clear_btn.click(clear_session, [], [chatbot, demo_state])
160
 
161
+ demo.launch(share=True)