Maria Tsilimos commited on
Commit
5dc2fb5
·
unverified ·
1 Parent(s): 471a133

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -4
app.py CHANGED
@@ -239,12 +239,18 @@ if source_type:
239
  mime="application/zip",)
240
 
241
 
242
- if comet_initialized and experiment: # Ensure experiment exists before ending
243
- experiment.end()
244
  else:
245
  st.warning("No meaningful text found to process. Please enter a URL or text.")
 
246
 
247
- except requests.exceptions.RequestException as e:
248
- st.error(f"Error fetching the URL: {e}. Please check the URL and your internet connection.")
 
 
 
249
 
250
  st.write(f"Number of times you requested results: **{st.session_state['source_type_attempts']}/{max_attempts}**")
 
 
 
 
239
  mime="application/zip",)
240
 
241
 
242
+ st.divider()
 
243
  else:
244
  st.warning("No meaningful text found to process. Please enter a URL or text.")
245
+
246
 
247
+ except Exception as e:
248
+ st.error(f"An unexpected error occurred: {e}")
249
+ finally:
250
+ if comet_initialized and experiment:
251
+ experiment.end()
252
 
253
  st.write(f"Number of times you requested results: **{st.session_state['source_type_attempts']}/{max_attempts}**")
254
+
255
+
256
+