RaushanTurganbay HF staff commited on
Commit
fa3dd28
1 Parent(s): 37a8553

update processor kwargs

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