Spaces:
Runtime error
Runtime error
Mehdi Cherti
commited on
Commit
•
21418bd
1
Parent(s):
2f12ebe
update
Browse files- clip_encoder.py +4 -0
clip_encoder.py
CHANGED
@@ -17,7 +17,11 @@ class CLIPEncoder(nn.Module):
|
|
17 |
if os.path.exists(fname):
|
18 |
print(fname)
|
19 |
pretrained = fname
|
|
|
|
|
|
|
20 |
self.model = model
|
|
|
21 |
self.pretrained = pretrained
|
22 |
self.model, _, _ = open_clip.create_model_and_transforms(model, pretrained=pretrained)
|
23 |
self.output_size = self.model.transformer.width
|
|
|
17 |
if os.path.exists(fname):
|
18 |
print(fname)
|
19 |
pretrained = fname
|
20 |
+
model = "ViT-B-32"
|
21 |
+
pretrained = "openai"
|
22 |
+
|
23 |
self.model = model
|
24 |
+
|
25 |
self.pretrained = pretrained
|
26 |
self.model, _, _ = open_clip.create_model_and_transforms(model, pretrained=pretrained)
|
27 |
self.output_size = self.model.transformer.width
|