Spaces:
No application file
No application file
| 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)) |