ashok2216 commited on
Commit
0c3d325
·
verified ·
1 Parent(s): 6580a7b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
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)