CultriX commited on
Commit
ce90e91
·
verified ·
1 Parent(s): c64b7d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -320,7 +320,8 @@ with gr.Blocks() as demo:
320
  gr.Markdown("## Multi-Agent Task Solver with Human-in-the-Loop")
321
 
322
  with gr.Row():
323
- chat_output = gr.Chatbot(label="Conversation")
 
324
 
325
  with gr.Row():
326
  with gr.Column(scale=8):
@@ -330,8 +331,8 @@ with gr.Blocks() as demo:
330
 
331
  send_button = gr.Button("Send")
332
 
333
- # When Send is clicked, the multi_agent_chat generator is called and its output is streamed to the chat.
334
- send_button.click(fn=multi_agent_chat, inputs=[message_input, api_key_input], outputs=chat_output, stream=True)
335
 
336
  if __name__ == "__main__":
337
  demo.launch(share=True)
 
320
  gr.Markdown("## Multi-Agent Task Solver with Human-in-the-Loop")
321
 
322
  with gr.Row():
323
+ # Set type="messages" to avoid deprecation warnings.
324
+ chat_output = gr.Chatbot(label="Conversation", type="messages")
325
 
326
  with gr.Row():
327
  with gr.Column(scale=8):
 
331
 
332
  send_button = gr.Button("Send")
333
 
334
+ # Remove stream=True (not supported in your Gradio version).
335
+ send_button.click(fn=multi_agent_chat, inputs=[message_input, api_key_input], outputs=chat_output)
336
 
337
  if __name__ == "__main__":
338
  demo.launch(share=True)