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
- Xet hash:
- 10501c02fa6ce360642cc46ec56b2c166b05bee4a06aba77b99c330f9e4cef8c
- Size of remote file:
- 982 MB
- SHA256:
- 2605a69b760d0b218c3b5d2069ba070d28f279a16ce4bc87bf019b75a91553e6
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.