Instructions to use mdevst/trocr-large-handwritten with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mdevst/trocr-large-handwritten 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="mdevst/trocr-large-handwritten")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("mdevst/trocr-large-handwritten") model = AutoModelForMultimodalLM.from_pretrained("mdevst/trocr-large-handwritten", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit History
-
Create README.md
Verified signature# TrOCR Large Handwritten - ONNX This is an ONNX conversion of Microsoft's [trocr-large-handwritten](https://huggingface.co/microsoft/trocr-large-handwritten) model, optimized for web deployment and edge inference. ## 📝 Model Description **TrOCR (Transformer-based Optical Character Recognition)** is a state-of-the-art model for handwritten text recognition. This ONNX version enables: - ⚡ **Web deployment** with [Transformers.js](https://huggingface.co/docs/transformers.js) - 🚀 **Edge inference** with ONNX Runtime - 📱 **Cross-platform** compatibility (Web, Node.js, Mobile) ## 🔧 Usage ### Web (Transformers.js) ```javascript import { pipeline } from '@huggingface/transformers'; const captioner = await pipeline('image-to-text', 'mdevst/trocr-large-handwritten'); // Use with image const result = await captioner('path/to/handwritten/image.jpg'); console.log(result[0].generated_text); ``` ### Node.js (ONNX Runtime) ```javascript const ort = require('onnxruntime-node'); // Load…0dbca46