Weifeng-Chen
commited on
Commit
•
d89f373
1
Parent(s):
55a841a
readme update
Browse files
README.md
CHANGED
@@ -40,8 +40,8 @@ text = text_tokenizer(query_texts, return_tensors='pt', padding=True)['input_ids
|
|
40 |
|
41 |
url = "http://images.cocodataset.org/val2017/000000039769.jpg" # 这里可以换成任意图片的url
|
42 |
# 加载CLIP的image encoder
|
43 |
-
clip_model = CLIPModel.from_pretrained("openai/
|
44 |
-
processor = CLIPProcessor.from_pretrained("openai/
|
45 |
image = processor(images=Image.open(requests.get(url, stream=True).raw), return_tensors="pt")
|
46 |
|
47 |
with torch.no_grad():
|
|
|
40 |
|
41 |
url = "http://images.cocodataset.org/val2017/000000039769.jpg" # 这里可以换成任意图片的url
|
42 |
# 加载CLIP的image encoder
|
43 |
+
clip_model = CLIPModel.from_pretrained("openai/clip-vit-large-patch14")
|
44 |
+
processor = CLIPProcessor.from_pretrained("openai/clip-vit-large-patch14")
|
45 |
image = processor(images=Image.open(requests.get(url, stream=True).raw), return_tensors="pt")
|
46 |
|
47 |
with torch.no_grad():
|