Instructions to use kaan84/sinhala-print-trocr with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kaan84/sinhala-print-trocr 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="kaan84/sinhala-print-trocr")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("kaan84/sinhala-print-trocr", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| project: | |
| name: trocr-sinhala-printed-lines | |
| protocol_version: "1.0" | |
| protocol_date: "2026-07-28" | |
| assets: | |
| base_model: | |
| id: Ransaka/TrOCR-Sinhala | |
| revision: TO_RECORD | |
| training_dataset: | |
| id: Ransaka/sinhala_synthetic_ocr-large | |
| revision: TO_RECORD | |
| split: train | |
| evaluation_dataset: | |
| id: avishadilhara/sinhala-ocr-lk-acts-1010 | |
| revision: TO_RECORD | |
| split: test | |
| data_split: | |
| seed: 42 | |
| train_fraction: 0.90 | |
| validation_fraction: 0.10 | |
| training: | |
| optimizer: adamw | |
| learning_rate: 0.00004 | |
| epochs: 10 | |
| effective_batch_size: 8 | |
| fp16: true | |
| seeds: [42, 123, 2026] | |
| save_strategy: epoch | |
| selection_metric: normalized_cer | |
| selection_mode: min | |
| generation: | |
| num_beams: 4 | |
| normalization: | |
| unicode_form: NFC | |
| convert_linebreaks_and_tabs_to_spaces: true | |
| collapse_whitespace: true | |
| strip_outer_whitespace: true | |
| preserve_punctuation: true | |
| preserve_diacritics: true | |
| evaluation: | |
| primary_metric: cer | |
| secondary_metric: wer | |
| report_raw_and_normalized: true | |
| bootstrap_replicates: 10000 | |
| bootstrap_seed: 42 | |
| confidence_level: 0.95 | |
| release: | |
| publish_weights: false | |
| blocker: Ransaka/TrOCR-Sinhala has no declared license | |