awacke1 commited on
Commit
3f1939c
·
1 Parent(s): 607eb3f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -6
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
- 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)
 
 
 
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')