metadata
datasets:
- ayoubkirouane/captcha
- project-sloth/captcha-images
language:
- en
library_name: transformers
pipeline_tag: image-text-to-text
Base Model :
- vikhyatk/moondream2
Dataset :
- project-sloth/captcha-images
Load model :
from transformers import AutoModelForCausalLM, AutoTokenizer
from PIL import Image
model_id = "ayoubkirouane/moondream2-image-captcha"
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained(model_id , trust_remote_code=True)
image = Image.open('/content/test.png')
enc_image = model.encode_image(image)
print(model.answer_question(enc_image, "What does the text say?", tokenizer))