Chandranshu Jain commited on
Commit
f789b62
1 Parent(s): 98ee1c8

Update app.py

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