DylanWolf commited on
Commit
fcd3f46
·
1 Parent(s): 936423c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -28,8 +28,11 @@ def main():
28
  if st.button("Submit"):
29
  if user_input:
30
  st.write("User: ", user_input)
31
- response = query(user_input)
32
- st.write("Chatbot: ", response)
 
 
 
33
 
34
  if __name__ == "__main__":
35
  main()
 
28
  if st.button("Submit"):
29
  if user_input:
30
  st.write("User: ", user_input)
31
+ try:
32
+ response = query(user_input)
33
+ st.write("Chatbot: ", response)
34
+ except Exception as e:
35
+ st.error(f"An error occurred: {str(e)}")
36
 
37
  if __name__ == "__main__":
38
  main()