Spaces:
Sleeping
Sleeping
shivangibithel
commited on
Commit
•
b68c4cb
1
Parent(s):
2cab114
Update app.py
Browse files
app.py
CHANGED
@@ -53,7 +53,7 @@ text_model = CLIPTextModelWithProjection.from_pretrained("openai/clip-vit-base-p
|
|
53 |
text_tokenizer = AutoTokenizer.from_pretrained("openai/clip-vit-base-patch32")
|
54 |
d = 1024
|
55 |
text_index = faiss.index_factory(d, "Flat", faiss.METRIC_INNER_PRODUCT)
|
56 |
-
faiss.read_index("text_index.index")
|
57 |
|
58 |
def T2Isearch(query,focussed_word, k=5):
|
59 |
# Encode the text query
|
|
|
53 |
text_tokenizer = AutoTokenizer.from_pretrained("openai/clip-vit-base-patch32")
|
54 |
d = 1024
|
55 |
text_index = faiss.index_factory(d, "Flat", faiss.METRIC_INNER_PRODUCT)
|
56 |
+
text_index = faiss.read_index("text_index.index")
|
57 |
|
58 |
def T2Isearch(query,focussed_word, k=5):
|
59 |
# Encode the text query
|