nielsr HF staff commited on
Commit
8cd1ec3
1 Parent(s): 538da78

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -1
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)