RaushanTurganbay HF staff commited on
Commit
0fad4a3
1 Parent(s): 8373082

update processor kwargs

Browse files
Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -106,7 +106,7 @@ prompt = processor.apply_chat_template(conversation, add_generation_prompt=True)
106
 
107
  image_file = "http://images.cocodataset.org/val2017/000000039769.jpg"
108
  raw_image = Image.open(requests.get(image_file, stream=True).raw)
109
- inputs = processor(prompt, raw_image, return_tensors='pt').to(0, torch.float16)
110
 
111
  output = model.generate(**inputs, max_new_tokens=200, do_sample=False)
112
  print(processor.decode(output[0][2:], skip_special_tokens=True))
 
106
 
107
  image_file = "http://images.cocodataset.org/val2017/000000039769.jpg"
108
  raw_image = Image.open(requests.get(image_file, stream=True).raw)
109
+ inputs = processor(images=raw_image, text=prompt, return_tensors='pt').to(0, torch.float16)
110
 
111
  output = model.generate(**inputs, max_new_tokens=200, do_sample=False)
112
  print(processor.decode(output[0][2:], skip_special_tokens=True))