Update app.py
Browse files
app.py
CHANGED
@@ -47,8 +47,9 @@ data = dataset
|
|
47 |
d = 384 # vectors dimension
|
48 |
m = 32 # hnsw parameter. Higher is more accurate but takes more time to index (default is 32, 128 should be ok)
|
49 |
#index = faiss.IndexHNSWFlat(d, m)
|
50 |
-
index = faiss.IndexFlatL2(embedding_dim)
|
51 |
-
|
|
|
52 |
#data.add_faiss_index("embeddings")
|
53 |
# adds an index column for the embeddings
|
54 |
|
|
|
47 |
d = 384 # vectors dimension
|
48 |
m = 32 # hnsw parameter. Higher is more accurate but takes more time to index (default is 32, 128 should be ok)
|
49 |
#index = faiss.IndexHNSWFlat(d, m)
|
50 |
+
#index = faiss.IndexFlatL2(embedding_dim)
|
51 |
+
index = faiss.Index(embedding_dim)
|
52 |
+
data.add_faiss_index("embeddings", custom_index=index)
|
53 |
#data.add_faiss_index("embeddings")
|
54 |
# adds an index column for the embeddings
|
55 |
|