RaushanTurganbay HF staff commited on
Commit
9de5518
1 Parent(s): 37bf121

update processor kwargs

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