Update README.md
Browse files```
processing_qwen2_vl.py", line 140, in __call__
text[i] = text[i].replace("<|placeholder|>", "<|image_pad|>")
AttributeError: 'list' object has no attribute 'replace'
```
processor expects `str` instead of `token_ids`
README.md
CHANGED
@@ -197,7 +197,7 @@ conversation = [
|
|
197 |
|
198 |
|
199 |
# Preprocess the inputs
|
200 |
-
text_prompt = processor.apply_chat_template(conversation, add_generation_prompt=True)
|
201 |
# Excepted output: '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n<|im_start|>user\n<|vision_start|><|image_pad|><|vision_end|>Describe this image.<|im_end|>\n<|im_start|>assistant\n'
|
202 |
|
203 |
inputs = processor(
|
|
|
197 |
|
198 |
|
199 |
# Preprocess the inputs
|
200 |
+
text_prompt = processor.apply_chat_template(conversation, tokenize=False, add_generation_prompt=True)
|
201 |
# Excepted output: '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n<|im_start|>user\n<|vision_start|><|image_pad|><|vision_end|>Describe this image.<|im_end|>\n<|im_start|>assistant\n'
|
202 |
|
203 |
inputs = processor(
|