Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -28,7 +28,7 @@ data.reset_index(inplace=True)
|
|
28 |
# Create a FAISS index for fast similarity search
|
29 |
index = faiss.IndexFlatL2(len(data["embedding"][0]))
|
30 |
index.metric_type = faiss.METRIC_INNER_PRODUCT
|
31 |
-
index.add(numpy.stack(faiss.normalize_L2(data["embedding"]
|
32 |
|
33 |
|
34 |
# Define the search function
|
|
|
28 |
# Create a FAISS index for fast similarity search
|
29 |
index = faiss.IndexFlatL2(len(data["embedding"][0]))
|
30 |
index.metric_type = faiss.METRIC_INNER_PRODUCT
|
31 |
+
index.add(numpy.stack(faiss.normalize_L2(data["embedding"]), axis=0))
|
32 |
|
33 |
|
34 |
# Define the search function
|