Shreyas094 commited on
Commit
7ce1997
1 Parent(s): e8c88b8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -25,7 +25,7 @@ def get_embeddings():
25
 
26
  def create_or_update_database(data, embeddings):
27
  if os.path.exists("faiss_database"):
28
- db = FAISS.load_local("faiss_database", embeddings)
29
  db.add_documents(data)
30
  else:
31
  db = FAISS.from_documents(data, embeddings)
 
25
 
26
  def create_or_update_database(data, embeddings):
27
  if os.path.exists("faiss_database"):
28
+ db = FAISS.load_local("faiss_database", embeddings, allow_dangerous_deserialization=True)
29
  db.add_documents(data)
30
  else:
31
  db = FAISS.from_documents(data, embeddings)