ArturG9 commited on
Commit
ece597d
1 Parent(s): 7326ab5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -117,12 +117,12 @@ def main():
117
 
118
  st.header("Chat with multiple PDFs :books:")
119
 
120
-
121
-
122
  vectorstore = None
123
- conversation = None
124
 
125
 
 
 
126
 
127
 
128
 
@@ -145,7 +145,7 @@ def main():
145
  vectorstore = get_vectorstore(text_chunks)
146
 
147
  # create conversation chain
148
- conversation = get_conversation_chain()
149
 
150
  st.success("Files have been processed into a vector store.")
151
 
@@ -153,7 +153,7 @@ def main():
153
 
154
 
155
 
156
- st.subheader("Chat Bot")
157
  if user_question := st.text_input("Ask a question about your documents:"):
158
  handle_userinput(user_question, vectorstore, conversation)
159
 
 
117
 
118
  st.header("Chat with multiple PDFs :books:")
119
 
 
 
120
  vectorstore = None
121
+ conversation = None
122
 
123
 
124
+ if user_question := st.text_input("Ask a question about your documents:"):
125
+ handle_userinput(user_question, vectorstore, conversation)
126
 
127
 
128
 
 
145
  vectorstore = get_vectorstore(text_chunks)
146
 
147
  # create conversation chain
148
+ st.session_state.conversation\ = get_conversation_chain()
149
 
150
  st.success("Files have been processed into a vector store.")
151
 
 
153
 
154
 
155
 
156
+
157
  if user_question := st.text_input("Ask a question about your documents:"):
158
  handle_userinput(user_question, vectorstore, conversation)
159