Typst Equation OCR Model
A pretrained TrOCR model for Typst equation OCR tasks.
Usage
Using transformers
from PIL import Image
from transformers import TrOCRProcessor, VisionEncoderDecoderModel
processor = TrOCRProcessor.from_pretrained("paran3xus/typst_eq_ocr")
model = VisionEncoderDecoderModel.from_pretrained('paran3xus/typst_eq_ocr')
image_fps = [
'testimg/1.png',
]
images = [Image.open(fp).convert('RGB') for fp in image_fps]
pixel_values = processor(images=images, return_tensors="pt").pixel_values
generated_ids = model.generate(pixel_values)
generated_text = processor.batch_decode(generated_ids, skip_special_tokens=True)
[print(i) for i in generated_text]
Using Typress Client with Web Frontend
- Downloads last month
- 114
Inference Providers
NEW
This model is not currently available via any of the supported third-party Inference Providers, and
the model is not deployed on the HF Inference API.