Huzaifa367 commited on
Commit
53e9d14
·
verified ·
1 Parent(s): 4f0c300

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -9
app.py CHANGED
@@ -87,18 +87,21 @@ def main():
87
  text_chunks = get_text_chunks(raw_text)
88
  get_vector_store(text_chunks, api_key)
89
  st.success("Processing Complete")
90
-
91
- # Check if PDF documents are uploaded and processing is complete
92
- if pdf_docs is not None and raw_text is not None:
93
- with col1:
94
  user_question = st.text_input("Ask a question from the Docs")
95
  if user_question:
96
  user_input(user_question, api_key)
97
- raw_text = get_pdf_text(pdf_docs)
98
- # Show message if no PDF documents are uploaded
99
- if pdf_docs is None:
100
- with col1:
101
- st.write("Please upload a document first to proceed.")
 
 
 
 
 
 
 
102
 
103
  # Display extracted text if available
104
  if raw_text is not None:
 
87
  text_chunks = get_text_chunks(raw_text)
88
  get_vector_store(text_chunks, api_key)
89
  st.success("Processing Complete")
 
 
 
 
90
  user_question = st.text_input("Ask a question from the Docs")
91
  if user_question:
92
  user_input(user_question, api_key)
93
+
94
+ # # Check if PDF documents are uploaded and processing is complete
95
+ # if pdf_docs is not None and raw_text is not None:
96
+ # with col1:
97
+ # user_question = st.text_input("Ask a question from the Docs")
98
+ # if user_question:
99
+ # user_input(user_question, api_key)
100
+ # raw_text = get_pdf_text(pdf_docs)
101
+ # # Show message if no PDF documents are uploaded
102
+ # if pdf_docs is None:
103
+ # with col1:
104
+ # st.write("Please upload a document first to proceed.")
105
 
106
  # Display extracted text if available
107
  if raw_text is not None: