luiscgp commited on
Commit
3c5d25f
1 Parent(s): 234ce45
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -157,9 +157,13 @@ def start_haystack():
157
  """
158
  load document store, retriever, entailment checker and create pipeline
159
  """
160
-
 
 
 
 
161
  document_store = FAISSDocumentStore.load("./data/my_faiss_index.faiss")
162
-
163
  print(f"Index size: {document_store.get_document_count()}")
164
  retriever = EmbeddingRetriever(
165
  document_store=document_store,
 
157
  """
158
  load document store, retriever, entailment checker and create pipeline
159
  """
160
+ try:
161
+ os.remove('./faiss_document_store.db')
162
+ except:
163
+ pass
164
+ shutil.copy("./data/faiss_document_store.db", ".")
165
  document_store = FAISSDocumentStore.load("./data/my_faiss_index.faiss")
166
+
167
  print(f"Index size: {document_store.get_document_count()}")
168
  retriever = EmbeddingRetriever(
169
  document_store=document_store,