Maria Tsilimos commited on
Commit
280332c
·
unverified ·
1 Parent(s): 1558ee3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -4
app.py CHANGED
@@ -268,12 +268,18 @@ if source_type:
268
  mime="application/zip",)
269
 
270
 
271
- if comet_initialized and experiment: # Ensure experiment exists before ending
272
- experiment.end()
273
  else:
274
  st.warning("No meaningful text found to process. Please enter a URL or text.")
 
275
 
276
- except requests.exceptions.RequestException as e:
277
- st.error(f"Error fetching the URL: {e}. Please check the URL and your internet connection.")
 
 
 
278
 
279
  st.write(f"Number of times you requested results: **{st.session_state['source_type_attempts']}/{max_attempts}**")
 
 
 
 
268
  mime="application/zip",)
269
 
270
 
271
+ st.divider()
 
272
  else:
273
  st.warning("No meaningful text found to process. Please enter a URL or text.")
274
+
275
 
276
+ except Exception as e:
277
+ st.error(f"An unexpected error occurred: {e}")
278
+ finally:
279
+ if comet_initialized and experiment:
280
+ experiment.end()
281
 
282
  st.write(f"Number of times you requested results: **{st.session_state['source_type_attempts']}/{max_attempts}**")
283
+
284
+
285
+