Instructions to use microsoft/trocr-base-str with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use microsoft/trocr-base-str 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-base-str")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("microsoft/trocr-base-str") model = AutoModelForMultimodalLM.from_pretrained("microsoft/trocr-base-str", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit History
-
Update preprocessor_config.json
Verified signature26c151f -
Update preprocessor_config.json (#2)
Verified signature- Update preprocessor_config.json (413bdf507e3d9e97983ce9677de28928e81836dc) Co-authored-by: Rohit <rohit5895@users.noreply.huggingface.co>48b3b47
-
Adding generation config file(s)
05d033c
-
Update README.md
d7245b3
-
Create README.md
1317130
-
add model
cf54a4b -
add model
44bfd29 -
initial commit
ecbacb2