Spaces:
Runtime error
Runtime error
shivangibithel
commited on
Commit
·
b047033
1
Parent(s):
dec5315
Update app.py
Browse files
app.py
CHANGED
@@ -24,8 +24,8 @@ zip_file = zipfile.ZipFile(zip_path)
|
|
24 |
model_name = "sentence-transformers/all-distilroberta-v1"
|
25 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
26 |
model = SentenceTransformer(model_name)
|
27 |
-
vectors = model.encode(caption_list)
|
28 |
-
|
29 |
vector_dimension = vectors.shape[1]
|
30 |
index = faiss.IndexFlatL2(vector_dimension)
|
31 |
faiss.normalize_L2(vectors)
|
|
|
24 |
model_name = "sentence-transformers/all-distilroberta-v1"
|
25 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
26 |
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.IndexFlatL2(vector_dimension)
|
31 |
faiss.normalize_L2(vectors)
|