ArturG9 commited on
Commit
d775c6d
1 Parent(s): c9ca248

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -15
app.py CHANGED
@@ -106,27 +106,17 @@ def sidebar():
106
  st.subheader("Your documents")
107
  pdf_docs = st.file_uploader("For Chatbot to get alive, upload your PDFs here and click on 'Process'", accept_multiple_files=True)
108
 
109
- vectorstore = None
110
- conversation = None
111
-
112
  if st.button("Process"):
113
  if pdf_docs:
114
  with st.spinner("Processing"):
115
- # get pdf text
116
- raw_text = get_pdf_text(pdf_docs)
117
-
118
- # get the text chunks
119
- text_chunks = get_text_chunks(raw_text)
120
-
121
- # create vector store
122
  vectorstore = get_vectorstore(text_chunks)
123
-
124
- # create conversation chain
125
  conversation = get_conversation_chain()
 
 
 
126
 
127
- st.success("Files have been processed into a vector store.")
128
-
129
- return vectorstore, conversation
130
 
131
 
132
 
 
106
  st.subheader("Your documents")
107
  pdf_docs = st.file_uploader("For Chatbot to get alive, upload your PDFs here and click on 'Process'", accept_multiple_files=True)
108
 
 
 
 
109
  if st.button("Process"):
110
  if pdf_docs:
111
  with st.spinner("Processing"):
112
+ # ... your processing code ...
 
 
 
 
 
 
113
  vectorstore = get_vectorstore(text_chunks)
 
 
114
  conversation = get_conversation_chain()
115
+ st.success("Files have been processed into a vector store.")
116
+ else:
117
+ st.write("Kazkas neto")
118
 
119
+ return vectorstore, conversation
 
 
120
 
121
 
122