luiscgp commited on
Commit
967a4ee
1 Parent(s): 3c5d25f
Files changed (2) hide show
  1. app.py +4 -2
  2. data/my_faiss_index.json +1 -1
app.py CHANGED
@@ -162,8 +162,10 @@ def start_haystack():
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,
 
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,
data/my_faiss_index.json CHANGED
@@ -1 +1 @@
1
- {"similarity": "cosine", "embedding_dim": 512, "sql_url": "sqlite:///pdf_faiss_document_store.db"}
 
1
+ {"similarity": "cosine", "embedding_dim": 512, "sql_url": "sqlite:///faiss_document_store.db"}