Update README.md
Browse files
README.md
CHANGED
@@ -42,9 +42,11 @@ transforms = v2.Compose(
|
|
42 |
v2.Normalize(mean=model.config.encoder.image_mean, std=model.config.encoder.image_std),
|
43 |
]
|
44 |
)
|
45 |
-
|
|
|
|
|
46 |
output_ids = model.generate(
|
47 |
-
pixel_values=images,
|
48 |
max_length=512,
|
49 |
bad_words_ids=[[tokenizer.convert_tokens_to_ids('[NF]')], [tokenizer.convert_tokens_to_ids('[NI]')]],
|
50 |
num_beams=4,
|
|
|
42 |
v2.Normalize(mean=model.config.encoder.image_mean, std=model.config.encoder.image_std),
|
43 |
]
|
44 |
)
|
45 |
+
|
46 |
+
image = transforms(image) # Fix.
|
47 |
+
|
48 |
output_ids = model.generate(
|
49 |
+
pixel_values=images, # Fix.
|
50 |
max_length=512,
|
51 |
bad_words_ids=[[tokenizer.convert_tokens_to_ids('[NF]')], [tokenizer.convert_tokens_to_ids('[NI]')]],
|
52 |
num_beams=4,
|