Instructions to use Xenova/trocr-base-printed with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use Xenova/trocr-base-printed with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('image-to-text', 'Xenova/trocr-base-printed');
Download special_tokens_map.json from Xenova/trocr-base-printed: direct link, hf CLI and curl.
- Browser
- Download file 957 Bytes
-
https://huggingface.co/Xenova/trocr-base-printed/resolve/main/special_tokens_map.json
- Command line
-
hf download hf://Xenova/trocr-base-printed/special_tokens_map.json
-
curl -L -o special_tokens_map.json https://huggingface.co/Xenova/trocr-base-printed/resolve/main/special_tokens_map.json
957 Bytes
| { | |
| "bos_token": { | |
| "content": "<s>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "cls_token": { | |
| "content": "<s>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "eos_token": { | |
| "content": "</s>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "mask_token": { | |
| "content": "<mask>", | |
| "lstrip": true, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "pad_token": { | |
| "content": "<pad>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "sep_token": { | |
| "content": "</s>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| }, | |
| "unk_token": { | |
| "content": "<unk>", | |
| "lstrip": false, | |
| "normalized": true, | |
| "rstrip": false, | |
| "single_word": false | |
| } | |
| } | |