Update README.md
Browse files
README.md
CHANGED
|
@@ -137,9 +137,12 @@ messages = [
|
|
| 137 |
}
|
| 138 |
]
|
| 139 |
|
|
|
|
|
|
|
|
|
|
| 140 |
inputs = processor(
|
| 141 |
images=[image],
|
| 142 |
-
|
| 143 |
padding=True,
|
| 144 |
return_tensors="pt",
|
| 145 |
add_generation_prompt=True,
|
|
@@ -201,9 +204,12 @@ messages = [
|
|
| 201 |
}
|
| 202 |
]
|
| 203 |
|
|
|
|
|
|
|
|
|
|
| 204 |
inputs = processor(
|
| 205 |
images=[image],
|
| 206 |
-
|
| 207 |
padding=True,
|
| 208 |
return_tensors="pt",
|
| 209 |
add_generation_prompt=True,
|
|
|
|
| 137 |
}
|
| 138 |
]
|
| 139 |
|
| 140 |
+
text = processor.apply_chat_template(
|
| 141 |
+
messages, tokenize=False, add_generation_prompt=True
|
| 142 |
+
)
|
| 143 |
inputs = processor(
|
| 144 |
images=[image],
|
| 145 |
+
text=[text],
|
| 146 |
padding=True,
|
| 147 |
return_tensors="pt",
|
| 148 |
add_generation_prompt=True,
|
|
|
|
| 204 |
}
|
| 205 |
]
|
| 206 |
|
| 207 |
+
text = processor.apply_chat_template(
|
| 208 |
+
messages, tokenize=False, add_generation_prompt=True
|
| 209 |
+
)
|
| 210 |
inputs = processor(
|
| 211 |
images=[image],
|
| 212 |
+
text=[text],
|
| 213 |
padding=True,
|
| 214 |
return_tensors="pt",
|
| 215 |
add_generation_prompt=True,
|