Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -366,9 +366,11 @@ if user_question:
|
|
366 |
with st.sidebar:
|
367 |
st.subheader("Your documents")
|
368 |
pdf_docs = st.file_uploader("Upload your PDFs here and click on 'Process'", accept_multiple_files=True)
|
369 |
-
if st.button("Process"):
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
|
|
|
|
|
366 |
with st.sidebar:
|
367 |
st.subheader("Your documents")
|
368 |
pdf_docs = st.file_uploader("Upload your PDFs here and click on 'Process'", accept_multiple_files=True)
|
369 |
+
#if st.button("Process"):
|
370 |
+
with st.spinner("Processing"):
|
371 |
+
raw_text = extract_text_from_pdfs(pdf_docs)
|
372 |
+
text_chunks = split_text_into_chunks(raw_text)
|
373 |
+
vectorstore = create_vector_store_from_text_chunks(text_chunks)
|
374 |
+
st.session_state.conversation = create_conversation_chain(vectorstore)
|
375 |
+
lenOfVectorStore = len(vectorstore)
|
376 |
+
st.markdown('# Extracted Text of Length:' + str(lenOfVectorStore) + ' and Created Search Index')
|