dvsth/LEGIT
Viewer • Updated • 21.2k • 119
How to use dvsth/LEGIT-TrOCR-MT with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("feature-extraction", model="dvsth/LEGIT-TrOCR-MT", trust_remote_code=True) # Load model directly
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("dvsth/LEGIT-TrOCR-MT", trust_remote_code=True)
model = AutoModel.from_pretrained("dvsth/LEGIT-TrOCR-MT", trust_remote_code=True)Code and quickstart available at: https://github.com/dvsth/learning-legibility-2023