Commit
•
b3ebc88
1
Parent(s):
3360655
Update README.md
Browse files
README.md
CHANGED
@@ -113,7 +113,7 @@ prompt = processor.apply_chat_template(conversation, add_generation_prompt=True)
|
|
113 |
|
114 |
image_file = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
115 |
raw_image = Image.open(requests.get(image_file, stream=True).raw)
|
116 |
-
inputs = processor(
|
117 |
|
118 |
output = model.generate(**inputs, max_new_tokens=200, do_sample=False)
|
119 |
print(processor.decode(output[0][2:], skip_special_tokens=True))
|
|
|
113 |
|
114 |
image_file = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
115 |
raw_image = Image.open(requests.get(image_file, stream=True).raw)
|
116 |
+
inputs = processor(images=raw_image, text=prompt, return_tensors='pt').to(0, torch.float16)
|
117 |
|
118 |
output = model.generate(**inputs, max_new_tokens=200, do_sample=False)
|
119 |
print(processor.decode(output[0][2:], skip_special_tokens=True))
|