shivangibithel commited on
Commit
aa90ca5
1 Parent(s): 1bd0451

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -43,7 +43,8 @@ zip_file = zipfile.ZipFile(zip_path)
43
 
44
  # text_model = CLIPTextModelWithProjection.from_pretrained("openai/clip-vit-base-patch32")
45
  # text_tokenizer = AutoTokenizer.from_pretrained("openai/clip-vit-base-patch32")
46
- text_index = faiss.index_factory(vectors.shape[1], "Flat", faiss.METRIC_INNER_PRODUCT)
 
47
  faiss.read_index("text_index.index")
48
 
49
  def T2Isearch(query, k=50):
 
43
 
44
  # text_model = CLIPTextModelWithProjection.from_pretrained("openai/clip-vit-base-patch32")
45
  # text_tokenizer = AutoTokenizer.from_pretrained("openai/clip-vit-base-patch32")
46
+ d = 1024
47
+ text_index = faiss.index_factory(d, "Flat", faiss.METRIC_INNER_PRODUCT)
48
  faiss.read_index("text_index.index")
49
 
50
  def T2Isearch(query, k=50):