You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great to have a simple example of object detection in the documentation so I can reproduce it. I currently tried to use the detect method, but I'm likely using the wrong model version.
from transformers import AutoModelForCausalLM, AutoTokenizer
from PIL import Image
model_id = "vikhyatk/moondream2"
revision = "2024-07-23"
model = AutoModelForCausalLM.from_pretrained(
model_id, trust_remote_code=True, revision=revision
)
tokenizer = AutoTokenizer.from_pretrained(model_id, revision=revision)
It would be great to have a simple example of object detection in the documentation so I can reproduce it. I currently tried to use the
detect
method, but I'm likely using the wrong model version.I load
input_image
with PIL. Then...returns:
The text was updated successfully, but these errors were encountered: