Deaksh commited on
Commit
a142b86
Β·
verified Β·
1 Parent(s): a815f2e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -35,6 +35,9 @@ if process_url_clicked:
35
  loader = UnstructuredURLLoader(urls=urls)
36
  main_placeholder.text("Data Loading...Started...βœ…βœ…βœ…")
37
  data = loader.load()
 
 
 
38
  # split data
39
  text_splitter = RecursiveCharacterTextSplitter(
40
  separators=['\n\n', '\n', '.', ','],
 
35
  loader = UnstructuredURLLoader(urls=urls)
36
  main_placeholder.text("Data Loading...Started...βœ…βœ…βœ…")
37
  data = loader.load()
38
+ if not data:
39
+ st.error("Failed to load content from the provided URLs. Please check their availability.")
40
+ st.stop()
41
  # split data
42
  text_splitter = RecursiveCharacterTextSplitter(
43
  separators=['\n\n', '\n', '.', ','],