nidhibodar11
commited on
Commit
•
feefb45
1
Parent(s):
22a8fd3
fixed multiloading bug
Browse files
app.py
CHANGED
@@ -65,7 +65,7 @@ st.session_state.text_splitter = RecursiveCharacterTextSplitter(chunk_size =1000
|
|
65 |
if option:
|
66 |
if option == "Website":
|
67 |
website_link = st.text_input("Enter the website link:")
|
68 |
-
if
|
69 |
with st.spinner("Loading website content..."):
|
70 |
st.session_state.loader = WebBaseLoader(website_link)
|
71 |
st.session_state.docs = st.session_state.loader.load()
|
@@ -76,7 +76,7 @@ if option:
|
|
76 |
|
77 |
elif option == "PDF(s)":
|
78 |
pdf_files = st.file_uploader("Upload your PDF files", type=["pdf"], accept_multiple_files=True)
|
79 |
-
if
|
80 |
with st.spinner("Loading pdf..."):
|
81 |
st.session_state.docs = get_pdf_processed(pdf_files)
|
82 |
st.session_state.final_documents = st.session_state.text_splitter.split_text(st.session_state.docs)
|
|
|
65 |
if option:
|
66 |
if option == "Website":
|
67 |
website_link = st.text_input("Enter the website link:")
|
68 |
+
if st.button("Submit & Process"):
|
69 |
with st.spinner("Loading website content..."):
|
70 |
st.session_state.loader = WebBaseLoader(website_link)
|
71 |
st.session_state.docs = st.session_state.loader.load()
|
|
|
76 |
|
77 |
elif option == "PDF(s)":
|
78 |
pdf_files = st.file_uploader("Upload your PDF files", type=["pdf"], accept_multiple_files=True)
|
79 |
+
if st.button("Submit & Process"):
|
80 |
with st.spinner("Loading pdf..."):
|
81 |
st.session_state.docs = get_pdf_processed(pdf_files)
|
82 |
st.session_state.final_documents = st.session_state.text_splitter.split_text(st.session_state.docs)
|