mohan007 commited on
Commit
9378cdd
1 Parent(s): c361a29

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -90,8 +90,10 @@ agent_executor = AgentExecutor(agent=agent, tools=tools, verbose=True,handle_par
90
  # agent = initialize_agent(
91
  # tools, llm, agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION, verbose=True
92
  # )
 
 
93
 
94
- with st.chat_message("assistant"):
95
- st_callback = StreamlitCallbackHandler(st.container())
96
- response = agent_executor.invoke(callbacks=[st_callback])
97
- st.write(response)
 
90
  # agent = initialize_agent(
91
  # tools, llm, agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION, verbose=True
92
  # )
93
+ prompt = st.chat_input("Say something")
94
+ if prompt:
95
 
96
+ with st.chat_message("assistant"):
97
+ st_callback = StreamlitCallbackHandler(st.container())
98
+ response = agent_executor.invoke({"input":prompt},callbacks=[st_callback])
99
+ st.write(response)