Update README.md
Browse files
README.md
CHANGED
@@ -56,7 +56,7 @@ with torch.no_grad():
|
|
56 |
pt_txt = tokenizer([text], return_tensors="pt").input_ids.cuda()
|
57 |
pt_img = image_processor([image], return_tensors="pt").pixel_values.to(torch.float16).cuda()
|
58 |
gen = model.generate(pt_txt, patch_images=pt_img, top_p=0.5, do_sample=True, no_repeat_ngram_size=3, max_length=256)
|
59 |
-
print(tokenizer.batch_decode(gen, skip_special_tokens=True).replace("not yet.", ""))
|
60 |
# e.g. [' is he the one who just threw the ball?'] # Due to the generator, different results may be output
|
61 |
```
|
62 |
|
|
|
56 |
pt_txt = tokenizer([text], return_tensors="pt").input_ids.cuda()
|
57 |
pt_img = image_processor([image], return_tensors="pt").pixel_values.to(torch.float16).cuda()
|
58 |
gen = model.generate(pt_txt, patch_images=pt_img, top_p=0.5, do_sample=True, no_repeat_ngram_size=3, max_length=256)
|
59 |
+
print(tokenizer.batch_decode(gen, skip_special_tokens=True)[0].replace("not yet.", ""))
|
60 |
# e.g. [' is he the one who just threw the ball?'] # Due to the generator, different results may be output
|
61 |
```
|
62 |
|