Update app.py
Browse files
app.py
CHANGED
@@ -44,7 +44,7 @@ data = dataset["train"]
|
|
44 |
print(data)
|
45 |
d = 384 # vectors dimension
|
46 |
m = 32 # hnsw parameter. Higher is more accurate but takes more time to index (default is 32, 128 should be ok)
|
47 |
-
index =
|
48 |
data = data.add_faiss_index("embeddings", custom_index=index)
|
49 |
# adds an index column that for the embeddings
|
50 |
|
|
|
44 |
print(data)
|
45 |
d = 384 # vectors dimension
|
46 |
m = 32 # hnsw parameter. Higher is more accurate but takes more time to index (default is 32, 128 should be ok)
|
47 |
+
index = FAISS.IndexHNSWFlat(d, m, FAISS.METRIC_INNER_PRODUCT)
|
48 |
data = data.add_faiss_index("embeddings", custom_index=index)
|
49 |
# adds an index column that for the embeddings
|
50 |
|