PerRing commited on
Commit
dca66d9
1 Parent(s): d127740

Update README.md

Browse files

the original example code included two BOS tokens during inference.

modified it so that only one BOS token is included.

Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -103,7 +103,7 @@ prompt = processor.tokenizer.apply_chat_template(
103
  )
104
  url = "https://www.ilankelman.org/stopsigns/australia.jpg"
105
  image = Image.open(requests.get(url, stream=True).raw)
106
- inputs = processor(text=prompt, images=image, return_tensors="pt")
107
 
108
  # Generate
109
  generate_ids = model.generate(**inputs, max_length=30)
 
103
  )
104
  url = "https://www.ilankelman.org/stopsigns/australia.jpg"
105
  image = Image.open(requests.get(url, stream=True).raw)
106
+ inputs = processor(text=prompt[5:], images=image, return_tensors="pt")
107
 
108
  # Generate
109
  generate_ids = model.generate(**inputs, max_length=30)