Instructions to use microsoft/trocr-base-stage1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use microsoft/trocr-base-stage1 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-stage1")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("microsoft/trocr-base-stage1") model = AutoModelForMultimodalLM.from_pretrained("microsoft/trocr-base-stage1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Xet hash:
- e6a4ab65ac8cc1812b0068903124a459515bb64a5e07e2e6fccdd45d4f01c72d
- Size of remote file:
- 1.54 GB
- SHA256:
- 538c8d13a3370e1e5532584f695fb4e800983662b1274cb46b1c438d6e156081
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.