Instructions to use jinhybr/OCR-Donut-CORD with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jinhybr/OCR-Donut-CORD 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="jinhybr/OCR-Donut-CORD")# Load model directly from transformers import AutoTokenizer, AutoModelForImageTextToText tokenizer = AutoTokenizer.from_pretrained("jinhybr/OCR-Donut-CORD") model = AutoModelForImageTextToText.from_pretrained("jinhybr/OCR-Donut-CORD") - Notebooks
- Google Colab
- Kaggle
Donut (base-sized model, fine-tuned on CORD)
Donut model fine-tuned on CORD. It was introduced in the paper OCR-free Document Understanding Transformer by Geewok et al. and first released in this repository.
Disclaimer: The team releasing Donut did not write a model card for this model so this model card has been written by the Hugging Face team.
Model description
Donut consists of a vision encoder (Swin Transformer) and a text decoder (BART). Given an image, the encoder first encodes the image into a tensor of embeddings (of shape batch_size, seq_len, hidden_size), after which the decoder autoregressively generates text, conditioned on the encoding of the encoder.
Intended uses & limitations
This model is fine-tuned on CORD, a document parsing dataset.
We refer to the documentation which includes code examples.
CORD Dataset
- Downloads last month
- 30

