zxcgqq commited on
Commit
b74c905
·
1 Parent(s): c12463b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -16,8 +16,8 @@ agent = initialize_agent(tools, llm, memory=memory, agent="conversational-react-
16
 
17
  def run_text(text, state):
18
  output = agent.run(input=(text))
19
-
20
- return output,output
21
 
22
  with gr.Blocks(css="#chatbot {overflow:auto; height:500px;}") as demo:
23
  chatbot = gr.Chatbot(elem_id="chatbot",show_label=False)
@@ -30,7 +30,7 @@ with gr.Blocks(css="#chatbot {overflow:auto; height:500px;}") as demo:
30
  with gr.Column(scale=0.20, min_width=0):
31
  clear = gr.Button("🔄Clear️")
32
 
33
- txt.submit(run_text, [txt, state], [chatbot, state])
34
- run.click(run_text, [txt, state], [chatbot, state])
35
 
36
  demo.queue(concurrency_count=10).launch(server_name="0.0.0.0", server_port=7860)
 
16
 
17
  def run_text(text, state):
18
  output = agent.run(input=(text))
19
+ print(output)
20
+ return output
21
 
22
  with gr.Blocks(css="#chatbot {overflow:auto; height:500px;}") as demo:
23
  chatbot = gr.Chatbot(elem_id="chatbot",show_label=False)
 
30
  with gr.Column(scale=0.20, min_width=0):
31
  clear = gr.Button("🔄Clear️")
32
 
33
+ txt.submit(run_text, [txt, state], [chatbot])
34
+ run.click(run_text, [txt, state], [chatbot])
35
 
36
  demo.queue(concurrency_count=10).launch(server_name="0.0.0.0", server_port=7860)