luiscgp commited on
Commit
234ce45
1 Parent(s): 5993764
Files changed (1) hide show
  1. app.py +3 -9
app.py CHANGED
@@ -157,15 +157,9 @@ def start_haystack():
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(
166
- faiss_index_path=f"./data/my_faiss_index.faiss",
167
- faiss_config_path=f"./data/my_faiss_index.json",
168
- )
169
  print(f"Index size: {document_store.get_document_count()}")
170
  retriever = EmbeddingRetriever(
171
  document_store=document_store,
 
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,