Hk4crprasad commited on
Commit
20d8851
·
verified ·
1 Parent(s): 416ca9e

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -770,14 +770,15 @@ else:
770
  csvexcelattachment = None
771
 
772
  if pdf_mode:
773
- pdf_docs = st.file_uploader("Upload your PDF Files and Click on the Submit & Process Button", accept_multiple_files=False)
774
- with st.spinner("Processing..."):
775
- raw_text = get_pdf_text(pdf_docs)
776
- text_chunks = get_text_chunks(raw_text)
777
- get_vector_store(text_chunks)
778
- st.success("Done")
779
- else:
780
- pdf_docs = None
 
781
 
782
  if pdf_mode:
783
  prompt = st.chat_input("Write your questions according to the pdf")
 
770
  csvexcelattachment = None
771
 
772
  if pdf_mode:
773
+ with st.sidebar:
774
+ st.title("Menu:")
775
+ pdf_docs = st.file_uploader("Upload your PDF Files and Click on the Submit & Process Button", accept_multiple_files=True)
776
+ if st.button("Submit & Process"):
777
+ with st.spinner("Processing..."):
778
+ raw_text = get_pdf_text(pdf_docs)
779
+ text_chunks = get_text_chunks(raw_text)
780
+ get_vector_store(text_chunks)
781
+ st.success("Done")
782
 
783
  if pdf_mode:
784
  prompt = st.chat_input("Write your questions according to the pdf")