aasherkamal216 commited on
Commit
df8b1ae
·
unverified ·
1 Parent(s): 0acbef9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -577,13 +577,13 @@ else:
577
  elif not validators.url(url):
578
  st.error("Please enter a valid URL")
579
  else:
580
- #try:
581
  with st.spinner("Summarizing..."):
582
  final_response = summarizer_model(model_params=model_params, api_key=groq_api_key, url=url)
583
  st.markdown(final_response)
584
  st.session_state.groq_chat_history.append({"role": "assistant", "content": final_response})
585
- # except Exception as e:
586
- # st.error(f"An error occurred: {e}")
587
 
588
  ###----- User Question -----###
589
  else:
 
577
  elif not validators.url(url):
578
  st.error("Please enter a valid URL")
579
  else:
580
+ try:
581
  with st.spinner("Summarizing..."):
582
  final_response = summarizer_model(model_params=model_params, api_key=groq_api_key, url=url)
583
  st.markdown(final_response)
584
  st.session_state.groq_chat_history.append({"role": "assistant", "content": final_response})
585
+ except Exception as e:
586
+ st.error(f"An error occurred: {e}", icon="❌")
587
 
588
  ###----- User Question -----###
589
  else: