gghfez/Llama-3.3-90B-Vision-merged
Updated
β’
233
β’
3
pip install competitions
, then run competitions create
and create competition by answering a few questions π₯ Checkout the github repo: https://github.com/huggingface/competitions and docs: https://hf.co/docs/competitions
from transformers import pipeline
from PIL import Image
import requests
# load pipe
image_classifier = pipeline(task="zero-shot-image-classification", model="google/siglip-base-patch16-256-i18n")
# load image
url = 'http://images.cocodataset.org/val2017/000000039769.jpg'
image = Image.open(requests.get(url, stream=True).raw)
# inference
outputs = image_classifier(image, candidate_labels=["2 cats", "a plane", "a remote"])
outputs = [{"score": round(output["score"], 4), "label": output["label"] } for output in outputs]
print(outputs)