Update README.md
Browse files
README.md
CHANGED
@@ -44,7 +44,7 @@ url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
|
44 |
image = Image.open(requests.get(url, stream=True).raw)
|
45 |
|
46 |
texts = ["a photo of 2 cats", "a photo of 2 dogs"]
|
47 |
-
inputs = processor(text=texts, images=image, return_tensors="pt")
|
48 |
|
49 |
with torch.no_grad():
|
50 |
outputs = model(**inputs)
|
|
|
44 |
image = Image.open(requests.get(url, stream=True).raw)
|
45 |
|
46 |
texts = ["a photo of 2 cats", "a photo of 2 dogs"]
|
47 |
+
inputs = processor(text=texts, images=image, padding="max_length", return_tensors="pt")
|
48 |
|
49 |
with torch.no_grad():
|
50 |
outputs = model(**inputs)
|