im commited on
Commit
2484f91
·
1 Parent(s): 8af2224

remove test code

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -232,16 +232,13 @@ def main() -> None:
232
  with st.spinner(f'answering the question...'):
233
  answer = qa(query=question, documents_to_search=20, model_name='gpt-4',
234
  api_key=st.session_state.open_api_key)
235
- if random.randint(0, 10) % 2 == 0:
236
- raise Exception("test")
237
  show_audio_message(answer)
238
  st.session_state.question = None
239
  show_question_input()
240
  else:
241
  show_question_input()
242
  except Exception as e:
243
- with st.expander("exception"):
244
- st.exception(e)
245
  st.warning("Whoops, looks like a hiccup in the system! But no worries, our tech wizards are already on the case, working their magic. In the meantime, how about giving it another shot?")
246
  if st.button("Give It Another Go!"):
247
  st.experimental_rerun()
 
232
  with st.spinner(f'answering the question...'):
233
  answer = qa(query=question, documents_to_search=20, model_name='gpt-4',
234
  api_key=st.session_state.open_api_key)
 
 
235
  show_audio_message(answer)
236
  st.session_state.question = None
237
  show_question_input()
238
  else:
239
  show_question_input()
240
  except Exception as e:
241
+ logging.error(e)
 
242
  st.warning("Whoops, looks like a hiccup in the system! But no worries, our tech wizards are already on the case, working their magic. In the meantime, how about giving it another shot?")
243
  if st.button("Give It Another Go!"):
244
  st.experimental_rerun()