Spaces:
Runtime error
Runtime error
shivangibithel
commited on
Commit
·
7318e38
1
Parent(s):
6c578ca
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ model = SentenceTransformer(model_name)
|
|
27 |
# vectors = model.encode(caption_list)
|
28 |
vectors = np.load("./sbert_text_features.npy")
|
29 |
vector_dimension = vectors.shape[1]
|
30 |
-
index = faiss.
|
31 |
faiss.normalize_L2(vectors)
|
32 |
index.add(vectors)
|
33 |
|
|
|
27 |
# vectors = model.encode(caption_list)
|
28 |
vectors = np.load("./sbert_text_features.npy")
|
29 |
vector_dimension = vectors.shape[1]
|
30 |
+
index = faiss.IndexFlatIP(vector_dimension)
|
31 |
faiss.normalize_L2(vectors)
|
32 |
index.add(vectors)
|
33 |
|