Update snippet
Browse files
README.md
CHANGED
@@ -47,8 +47,8 @@ import torch
|
|
47 |
from PIL import Image
|
48 |
import mobileclip
|
49 |
|
50 |
-
model, _, preprocess = mobileclip.create_model_and_transforms('
|
51 |
-
tokenizer = mobileclip.get_tokenizer('
|
52 |
|
53 |
image = preprocess(Image.open("docs/fig_accuracy_latency.png").convert('RGB')).unsqueeze(0)
|
54 |
text = tokenizer(["a diagram", "a dog", "a cat"])
|
|
|
47 |
from PIL import Image
|
48 |
import mobileclip
|
49 |
|
50 |
+
model, _, preprocess = mobileclip.create_model_and_transforms('mobileclip_b', pretrained='/path/to/mobileclip_b.pt')
|
51 |
+
tokenizer = mobileclip.get_tokenizer('mobileclip_b')
|
52 |
|
53 |
image = preprocess(Image.open("docs/fig_accuracy_latency.png").convert('RGB')).unsqueeze(0)
|
54 |
text = tokenizer(["a diagram", "a dog", "a cat"])
|