dmayboroda commited on
Commit
5074591
·
verified ·
1 Parent(s): 6cbb20f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -13,14 +13,14 @@ from usearch.index import Index
13
  dataset = load_dataset("dmayboroda/sk-test_1")
14
 
15
  device = "cuda" if torch.cuda.is_available() else "cpu"
16
- clipmodel, preprocess = clip.load("ViT-L/14", device=device)
17
 
18
- model_name = 'M-CLIP/LABSE-Vit-L-14'
19
  model = pt_multilingual_clip.MultilingualCLIP.from_pretrained(model_name)
20
  tokenizer = transformers.AutoTokenizer.from_pretrained(model_name)
21
  model.to(device)
22
 
23
- index = Index(ndim=768, metric='cos', dtype='f32')
24
 
25
  img_embeddings = []
26
  emb_to_img = {}
 
13
  dataset = load_dataset("dmayboroda/sk-test_1")
14
 
15
  device = "cuda" if torch.cuda.is_available() else "cpu"
16
+ clipmodel, preprocess = clip.load("ViT-B/32", device=device)
17
 
18
+ model_name = 'M-CLIP/XLM-Roberta-Large-Vit-B-32'
19
  model = pt_multilingual_clip.MultilingualCLIP.from_pretrained(model_name)
20
  tokenizer = transformers.AutoTokenizer.from_pretrained(model_name)
21
  model.to(device)
22
 
23
+ index = Index(ndim=512, metric='cos', dtype='f32')
24
 
25
  img_embeddings = []
26
  emb_to_img = {}