RaushanTurganbay HF staff commited on
Commit
a92a28c
1 Parent(s): 6ddaff3

update processor kwargs

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