Instructions to use Xenova/vit-gpt2-image-captioning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use Xenova/vit-gpt2-image-captioning with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('image-to-text', 'Xenova/vit-gpt2-image-captioning');
| { | |
| "add_prefix_space": false, | |
| "bos_token": "<|endoftext|>", | |
| "clean_up_tokenization_spaces": true, | |
| "eos_token": "<|endoftext|>", | |
| "max_length": 32, | |
| "model_max_length": 1024, | |
| "pad_to_multiple_of": null, | |
| "pad_token": "<|endoftext|>", | |
| "pad_token_type_id": 0, | |
| "padding_side": "right", | |
| "stride": 0, | |
| "tokenizer_class": "GPT2Tokenizer", | |
| "truncation_side": "right", | |
| "truncation_strategy": "longest_first", | |
| "unk_token": "<|endoftext|>" | |
| } | |