Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -94,25 +94,12 @@ def main():
|
|
| 94 |
if user_question:
|
| 95 |
raw_text = get_pdf_text(pdf_docs)
|
| 96 |
user_input(user_question, api_key)
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
# # Check if PDF documents are uploaded and processing is complete
|
| 100 |
-
# if pdf_docs is not None and raw_text is not None:
|
| 101 |
-
# with col1:
|
| 102 |
-
# user_question = st.text_input("Ask a question from the Docs")
|
| 103 |
-
# if user_question:
|
| 104 |
-
# user_input(user_question, api_key)
|
| 105 |
-
# raw_text = get_pdf_text(pdf_docs)
|
| 106 |
-
# # Show message if no PDF documents are uploaded
|
| 107 |
-
|
| 108 |
-
|
| 109 |
# Display extracted text if available
|
| 110 |
if raw_text is not None:
|
| 111 |
with col2:
|
| 112 |
st.subheader("Extracted Text from PDF:")
|
| 113 |
st.text(raw_text)
|
| 114 |
|
| 115 |
-
|
| 116 |
-
|
| 117 |
if __name__ == "__main__":
|
| 118 |
main()
|
|
|
|
| 94 |
if user_question:
|
| 95 |
raw_text = get_pdf_text(pdf_docs)
|
| 96 |
user_input(user_question, api_key)
|
| 97 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
# Display extracted text if available
|
| 99 |
if raw_text is not None:
|
| 100 |
with col2:
|
| 101 |
st.subheader("Extracted Text from PDF:")
|
| 102 |
st.text(raw_text)
|
| 103 |
|
|
|
|
|
|
|
| 104 |
if __name__ == "__main__":
|
| 105 |
main()
|