Views
No views yet
pip install -qU transformers accelerate einops bitsandbytes flash_attn timm1# load a free image from pixabay
2from PIL import Image
3import requests
4url = "https://cdn.pixabay.com/photo/2023/11/01/11/15/cable-car-8357178_640.jpg"
5img = Image.open(requests.get(url, stream=True).raw)
6
7# download model
8from transformers import AutoModelForCausalLM
9model = AutoModelForCausalLM.from_pretrained("dmedhi/flosmolv", trust_remote_code=True).cuda()
10model(img, "what is the object in the image?")