Kshreyas commited on
Commit
da3e7b6
·
1 Parent(s): c9a776d

exception handled

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -23,7 +23,10 @@ def get_response(question):
23
 
24
  chain = chatprompt|chat_llm|CommaseperatedOutput()
25
 
26
- response = chain.invoke({"text":question})
 
 
 
27
 
28
  return response
29
  # create streamlit app
 
23
 
24
  chain = chatprompt|chat_llm|CommaseperatedOutput()
25
 
26
+ try:
27
+ response = chain.invoke({"text":question})
28
+ except:
29
+ response = "I am running out of money right now. Come back after a decade. I am hoping to be a rich by then."
30
 
31
  return response
32
  # create streamlit app