Spaces:
Sleeping
Sleeping
change small model
Browse files
app.py
CHANGED
@@ -89,8 +89,8 @@ def zeroshot_classifier(model, classnames, templates, device):
|
|
89 |
zeroshot_weights = torch.stack(zeroshot_weights).cuda()
|
90 |
return zeroshot_weights*100
|
91 |
|
92 |
-
|
93 |
-
device = "cuda"
|
94 |
# Instantiate model
|
95 |
vis_model = CLIPModel_Super("ViT-B/16", device=device, download_root="./ckpt")
|
96 |
vis_model.eval()
|
|
|
89 |
zeroshot_weights = torch.stack(zeroshot_weights).cuda()
|
90 |
return zeroshot_weights*100
|
91 |
|
92 |
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
93 |
+
# device = "cuda"
|
94 |
# Instantiate model
|
95 |
vis_model = CLIPModel_Super("ViT-B/16", device=device, download_root="./ckpt")
|
96 |
vis_model.eval()
|