Instructions to use nlpconnect/vit-gpt2-image-captioning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nlpconnect/vit-gpt2-image-captioning 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="nlpconnect/vit-gpt2-image-captioning")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("nlpconnect/vit-gpt2-image-captioning") model = AutoModelForMultimodalLM.from_pretrained("nlpconnect/vit-gpt2-image-captioning", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit History
-
Updates README.md sample running code to remove FutureWarning deprecation error for `ViTFeatureExtractor`. (#14)
- Updates README.md sample running code to remove FutureWarning deprecation error for `ViTFeatureExtractor`. (496b5b1656cab6f6f963d1db47724f3cc56e6c7a) Co-authored-by: E <commonslash@users.noreply.huggingface.co>dc68f91
-
contact updated
0e334c7 -
link updated
a64c68b
-
Update README.md (#8)
- Update README.md (4a7a084d5dce710df8ebbe4ae421e1b41c95dda8) Co-authored-by: Omkar Subhash Ghongade <itsog@users.noreply.huggingface.co>13aad52
-
link updated
22a1024 -
Update README.md
readme updated2aeedcc
-
Update README.md (#5)
- Update README.md (638791fce1d14d57ded308ee42070ef12142f40a) Co-authored-by: Vishank Shah <vishank97@users.noreply.huggingface.co>602f999
-
Update README.md
d1ffa4d
-
Add image-to-text tag
27b41be
-
readme updated
f067fcd -
add tokenizer
b309c4b -
add tokenizer
d71cdce -
add model
d39f4f8 -
initial commit
f2fced7