Image-to-Text
Transformers
Safetensors
vision-encoder-decoder
image-text-to-text
Generated from Trainer
image-captioning
Instructions to use mo-thecreator/ViT-GPT2-Image_Captioning_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mo-thecreator/ViT-GPT2-Image_Captioning_model with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("image-to-text", model="mo-thecreator/ViT-GPT2-Image_Captioning_model")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("mo-thecreator/ViT-GPT2-Image_Captioning_model") model = AutoModelForMultimodalLM.from_pretrained("mo-thecreator/ViT-GPT2-Image_Captioning_model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 129 Bytes
32e6478 | 1 2 3 4 | version https://git-lfs.github.com/spec/v1
oid sha256:0bee922a139f7bb463929ce1596c39f316085f09c6abce09f9339d0ec028e22d
size 5304
|