calmgoose commited on
Commit
44c115b
·
1 Parent(s): c635c9b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -126,10 +126,11 @@ if ask:
126
 
127
  if api_key is None:
128
  output = "Whoops looks like you forgot your API key buddy"
129
- elif:
130
- output = get_answer(question=user_input)
131
  else:
132
- output = "What's going on? That's not the right API key"
 
 
 
133
 
134
  st.session_state.past.append(user_input)
135
  st.session_state.generated.append(output)
 
126
 
127
  if api_key is None:
128
  output = "Whoops looks like you forgot your API key buddy"
 
 
129
  else:
130
+ try:
131
+ output = get_answer(question=user_input)
132
+ except:
133
+ output = "What's going on? That's not the right API key"
134
 
135
  st.session_state.past.append(user_input)
136
  st.session_state.generated.append(output)