Spaces:
Configuration error
Configuration error
aasherkamal216
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -577,10 +577,13 @@ else:
|
|
| 577 |
elif not validators.url(url):
|
| 578 |
st.error("Please enter a valid URL")
|
| 579 |
else:
|
| 580 |
-
|
| 581 |
-
|
| 582 |
-
|
| 583 |
-
|
|
|
|
|
|
|
|
|
|
| 584 |
|
| 585 |
###----- User Question -----###
|
| 586 |
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:
|