nielsr HF staff commited on
Commit
d904981
1 Parent(s): aa7f89d

Update README.md

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