Instructions to use qantev/trocr-small-spanish with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use qantev/trocr-small-spanish 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="qantev/trocr-small-spanish")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("qantev/trocr-small-spanish") model = AutoModelForMultimodalLM.from_pretrained("qantev/trocr-small-spanish", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download background_encoder_decoder.png from qantev/trocr-small-spanish: direct link, hf CLI and curl.
- Browser
- Download file 74 kB
-
https://huggingface.co/qantev/trocr-small-spanish/resolve/main/background_encoder_decoder.png
- Command line
-
hf download hf://qantev/trocr-small-spanish/background_encoder_decoder.png
-
curl -L -o background_encoder_decoder.png https://huggingface.co/qantev/trocr-small-spanish/resolve/main/background_encoder_decoder.png
74 kB
