Instructions to use microsoft/trocr-small-printed with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use microsoft/trocr-small-printed 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="microsoft/trocr-small-printed")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("microsoft/trocr-small-printed") model = AutoModelForMultimodalLM.from_pretrained("microsoft/trocr-small-printed", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit History
-
Update preprocessor_config.json
Verified signatureUpdate image feature extractor name.f66a5bd
-
Adding generation config file(s)
e6eff16
-
Update README.md
03f95be
-
Update README.md (#1)
- Update README.md (a7ef5527234fd69ee74a2edb741184d9aa31b25c) Co-authored-by: Loïck BOURDOIS <lbourdois@users.noreply.huggingface.co>1afd9f0
-
Update code example
34306f7
-
Update from Minghao Li
Minghao Li25fe3e3 -
initial commit
41f69fa