red1xe commited on
Commit
49e9591
1 Parent(s): c1adec2
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -89,17 +89,17 @@ def main():
89
  user_question = st.text_input('Enter your message here:')
90
  pdf_file = st.file_uploader("Upload PDF", type=['pdf'])
91
  if st.button('Start Chain'):
92
- with st.spinner('Working in progress ...'):
93
- if pdf_file is not None:
94
  pdf_text = get_pdf_text(pdf_file)
95
  pdf_text_chunks = get_pdf_text_chunks(pdf_text)
96
  st.session_state.vector_store = create_vector_store(pdf_text_chunks)
97
  st.session_state.conversation = get_conversation_chain(
98
- retriever=st.session_state.vector_store,
99
  )
100
- st.success('Vectorstore created successfully! You can start chatting now!')
101
- else:
102
- st.warning('Please upload a PDF file first!')
103
 
104
 
105
  if user_question:
 
89
  user_question = st.text_input('Enter your message here:')
90
  pdf_file = st.file_uploader("Upload PDF", type=['pdf'])
91
  if st.button('Start Chain'):
92
+ if pdf_file is not None:
93
+ with st.spinner('Working in progress ...'):
94
  pdf_text = get_pdf_text(pdf_file)
95
  pdf_text_chunks = get_pdf_text_chunks(pdf_text)
96
  st.session_state.vector_store = create_vector_store(pdf_text_chunks)
97
  st.session_state.conversation = get_conversation_chain(
98
+ retriever=st.session_state.vector_store,
99
  )
100
+ st.success('Vectorstore created successfully! You can start chatting now!')
101
+ else:
102
+ st.warning('Please upload a PDF file first!')
103
 
104
 
105
  if user_question: