Musharraf11 commited on
Commit
9ed9b06
1 Parent(s): da6b73f

Update chatbot.py

Browse files
Files changed (1) hide show
  1. chatbot.py +12 -12
chatbot.py CHANGED
@@ -75,18 +75,18 @@ def chatbot():
75
  st.session_state.messages = []
76
 
77
  # Uncomment if you want to add your own-custom pdf:
78
- with st.form(key="uploader_form"):
79
- pdf_docs = st.file_uploader("Upload your PDF Files", accept_multiple_files=True)
80
- submit_button = st.form_submit_button(label="Submit & Process")
81
- if submit_button:
82
- if pdf_docs:
83
- with st.spinner("Processing..."):
84
- raw_text = get_pdf_text(pdf_docs)
85
- text_chunks = get_text_chunks(raw_text)
86
- get_vector_store(text_chunks)
87
- st.success("Processing completed successfully.")
88
- else:
89
- st.warning("Please upload at least one PDF file.")
90
 
91
  # Display chat messages from history on app rerun
92
  for message in st.session_state.messages:
 
75
  st.session_state.messages = []
76
 
77
  # Uncomment if you want to add your own-custom pdf:
78
+ # with st.form(key="uploader_form"):
79
+ # pdf_docs = st.file_uploader("Upload your PDF Files", accept_multiple_files=True)
80
+ # submit_button = st.form_submit_button(label="Submit & Process")
81
+ # if submit_button:
82
+ # if pdf_docs:
83
+ # with st.spinner("Processing..."):
84
+ # raw_text = get_pdf_text(pdf_docs)
85
+ # text_chunks = get_text_chunks(raw_text)
86
+ # get_vector_store(text_chunks)
87
+ # st.success("Processing completed successfully.")
88
+ # else:
89
+ # st.warning("Please upload at least one PDF file.")
90
 
91
  # Display chat messages from history on app rerun
92
  for message in st.session_state.messages: