Instructions to use Heliosoph/vit-gpt2-image-captioning-onnx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Heliosoph/vit-gpt2-image-captioning-onnx 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="Heliosoph/vit-gpt2-image-captioning-onnx")# Load model directly from transformers import AutoTokenizer, AutoModelForImageTextToText tokenizer = AutoTokenizer.from_pretrained("Heliosoph/vit-gpt2-image-captioning-onnx") model = AutoModelForImageTextToText.from_pretrained("Heliosoph/vit-gpt2-image-captioning-onnx") - Notebooks
- Google Colab
- Kaggle
File size: 134 Bytes
3dad833 | 1 2 3 4 | version https://git-lfs.github.com/spec/v1
oid sha256:0e5ff26055e1d90d853f92099c885e8c908ee7ac4683b98110ae790db344ad82
size 613198969
|