JustinLin610
commited on
Commit
·
717ba21
1
Parent(s):
b6105b7
Update README.md
Browse files
README.md
CHANGED
@@ -28,7 +28,7 @@ print("Available models:", available_models())
|
|
28 |
# Available models: ['ViT-B-16', 'ViT-L-14', 'ViT-L-14-336', 'ViT-H-14', 'RN50']
|
29 |
|
30 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
31 |
-
model, preprocess = load_from_name("
|
32 |
model.eval()
|
33 |
image = preprocess(Image.open("examples/pokemon.jpeg")).unsqueeze(0).to(device)
|
34 |
text = clip.tokenize(["杰尼龟", "妙蛙种子", "小火龙", "皮卡丘"]).to(device)
|
|
|
28 |
# Available models: ['ViT-B-16', 'ViT-L-14', 'ViT-L-14-336', 'ViT-H-14', 'RN50']
|
29 |
|
30 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
31 |
+
model, preprocess = load_from_name("RN50", device=device, download_root='./')
|
32 |
model.eval()
|
33 |
image = preprocess(Image.open("examples/pokemon.jpeg")).unsqueeze(0).to(device)
|
34 |
text = clip.tokenize(["杰尼龟", "妙蛙种子", "小火龙", "皮卡丘"]).to(device)
|