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")# Load model directly from transformers import AutoTokenizer, AutoModelForImageTextToText tokenizer = AutoTokenizer.from_pretrained("nlpconnect/vit-gpt2-image-captioning") model = AutoModelForImageTextToText.from_pretrained("nlpconnect/vit-gpt2-image-captioning") - Notebooks
- Google Colab
- Kaggle
Update README.md
#33
by Xardou23 - opened
README.md
CHANGED
|
@@ -14,7 +14,7 @@ widget:
|
|
| 14 |
|
| 15 |
# nlpconnect/vit-gpt2-image-captioning
|
| 16 |
|
| 17 |
-
This is an image captioning model trained by @
|
| 18 |
|
| 19 |
|
| 20 |
# The Illustrated Image Captioning using transformers
|
|
|
|
| 14 |
|
| 15 |
# nlpconnect/vit-gpt2-image-captioning
|
| 16 |
|
| 17 |
+
This is an image captioning model trained by @Xardous23 in [flax ](https://github.com/huggingface/transformers/tree/main/examples/flax/image-captioning) this is pytorch version of [this](https://huggingface.co/ydshieh/vit-gpt2-coco-en-ckpts).
|
| 18 |
|
| 19 |
|
| 20 |
# The Illustrated Image Captioning using transformers
|