Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -98,9 +98,9 @@ st.header("Chat with your pdf💁")
98
  with st.sidebar:
99
  st.title("PDF FILE UPLOAD:")
100
  pdf_docs = st.file_uploader("Upload your PDF File and Click on the Submit & Process Button", accept_multiple_files=False, key="pdf_uploader")
101
-
102
  query = st.chat_input("Ask a Question from the PDF File")
103
- if query:
104
  raw_text = get_pdf(pdf_docs)
105
  text_chunks = text_splitter(raw_text)
106
  st.session_state.messages.append({'role': 'user', "content": query})
 
98
  with st.sidebar:
99
  st.title("PDF FILE UPLOAD:")
100
  pdf_docs = st.file_uploader("Upload your PDF File and Click on the Submit & Process Button", accept_multiple_files=False, key="pdf_uploader")
101
+
102
  query = st.chat_input("Ask a Question from the PDF File")
103
+ if query and pdf_docs:
104
  raw_text = get_pdf(pdf_docs)
105
  text_chunks = text_splitter(raw_text)
106
  st.session_state.messages.append({'role': 'user', "content": query})