image / test
Kadirireddy's picture
Create test
5d5a89a verified
Raw
History Blame Contribute Delete
571 Bytes
from transformers import pipeline
pipe = pipeline(
task="image-text-to-text",
model="LiquidAI/LFM2.5-VL-450M",
trust_remote_code=True,
max_new_tokens=256
)
messages = [
{
"role": "user",
"content": [
{
"type": "image",
"url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"
},
{
"type": "text",
"text": "What animal is on the candy?"
}
]
}
]
print(pipe(messages))