SiraH commited on
Commit
50710f5
1 Parent(s): eb58dd5

solve db position

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -215,12 +215,12 @@ def main():
215
  data.extend(data_dir)
216
 
217
  #create vector from upload
218
- if len(data) > 0 :
219
- sp_docs = split_docs(documents = data)
220
- st.write(f"This document have {len(sp_docs)} chunks")
221
- embeddings = load_embeddings()
222
- with st.spinner('Wait for create vector'):
223
- db = FAISS.from_documents(sp_docs, embeddings)
224
  # db.save_local(DB_FAISS_UPLOAD_PATH)
225
  # st.write(f"Your model is already store in {DB_FAISS_UPLOAD_PATH}")
226
 
 
215
  data.extend(data_dir)
216
 
217
  #create vector from upload
218
+ #if len(data) > 0 :
219
+ sp_docs = split_docs(documents = data)
220
+ st.write(f"This document have {len(sp_docs)} chunks")
221
+ embeddings = load_embeddings()
222
+ # with st.spinner('Wait for create vector'):
223
+ db = FAISS.from_documents(sp_docs, embeddings)
224
  # db.save_local(DB_FAISS_UPLOAD_PATH)
225
  # st.write(f"Your model is already store in {DB_FAISS_UPLOAD_PATH}")
226