Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -69,11 +69,10 @@ def main():
|
|
69 |
st.text_area("Extracted Text:", pdf_text, height=300)
|
70 |
add_pdf_text_to_db(collection, pdf_text)
|
71 |
st.success("PDF text has been added to the database. You can now query it!")
|
72 |
-
query = st.text_input("Enter your query about the PDF:")
|
73 |
-
|
74 |
except Exception as e:
|
75 |
st.error(f"Error extracting text: {e}")
|
76 |
-
|
|
|
77 |
if query:
|
78 |
try:
|
79 |
answer, metadata = query_pdf_data(collection, query, retriever_model)
|
|
|
69 |
st.text_area("Extracted Text:", pdf_text, height=300)
|
70 |
add_pdf_text_to_db(collection, pdf_text)
|
71 |
st.success("PDF text has been added to the database. You can now query it!")
|
|
|
|
|
72 |
except Exception as e:
|
73 |
st.error(f"Error extracting text: {e}")
|
74 |
+
|
75 |
+
query = st.text_input("Enter your query about the PDF:")
|
76 |
if query:
|
77 |
try:
|
78 |
answer, metadata = query_pdf_data(collection, query, retriever_model)
|