Update app.py
Browse files
app.py
CHANGED
|
@@ -46,10 +46,9 @@ print(data)
|
|
| 46 |
d = 384 # vectors dimension
|
| 47 |
m = 32 # hnsw parameter. Higher is more accurate but takes more time to index (default is 32, 128 should be ok)
|
| 48 |
index = faiss.IndexHNSWFlat(d, m, faiss.METRIC_INNER_PRODUCT)
|
| 49 |
-
data
|
| 50 |
# adds an index column that for the embeddings
|
| 51 |
|
| 52 |
-
|
| 53 |
print("check1")
|
| 54 |
#question = "How can I reverse Diabetes?"
|
| 55 |
|
|
|
|
| 46 |
d = 384 # vectors dimension
|
| 47 |
m = 32 # hnsw parameter. Higher is more accurate but takes more time to index (default is 32, 128 should be ok)
|
| 48 |
index = faiss.IndexHNSWFlat(d, m, faiss.METRIC_INNER_PRODUCT)
|
| 49 |
+
data.add_faiss_index("embeddings", custom_index=index)
|
| 50 |
# adds an index column that for the embeddings
|
| 51 |
|
|
|
|
| 52 |
print("check1")
|
| 53 |
#question = "How can I reverse Diabetes?"
|
| 54 |
|