Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
| 98 |
-
#
|
| 99 |
-
if pdf_docs is None:
|
| 100 |
-
|
| 101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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:
|