Dhahlan2000 commited on
Commit
dc4a988
·
1 Parent(s): b8f13b8

added error handling for response

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -101,8 +101,8 @@ if st.button("Submit"):
101
  st.write("Debug: User Query ->", query)
102
  with st.spinner("Processing..."):
103
  try:
104
- response = agent.run(query)
105
- st.write("Debug: Agent Response ->", response)
106
  st.success("Response:")
107
  st.write(response)
108
  except Exception as e:
 
101
  st.write("Debug: User Query ->", query)
102
  with st.spinner("Processing..."):
103
  try:
104
+ response = agent.invoke(query)
105
+ print(f'Response: {response}')
106
  st.success("Response:")
107
  st.write(response)
108
  except Exception as e: