Instructions to use Ransaka/TrOCR-Sinhala with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ransaka/TrOCR-Sinhala 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="Ransaka/TrOCR-Sinhala")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("Ransaka/TrOCR-Sinhala") model = AutoModelForMultimodalLM.from_pretrained("Ransaka/TrOCR-Sinhala", device_map="auto") - Notebooks
- Google Colab
- Kaggle
License clarification for TrOCR-Sinhala
Hi @Ransaka ,
Thank you for releasing TrOCR-Sinhala and the Sinhala synthetic OCR dataset. They have been very useful for my printed Sinhala OCR research.
I am planning to fine-tune the model and publish the trained weights openly. However, I noticed that the model repository does not currently mention a license.
Could you please confirm the license for the checkpoint? If it is MIT, adding the license to the model card or confirming it here would be helpful.
I will include proper attribution and cite the dataset DOI: 10.57967/hf/1809.
Thank you again.
Thank you for reaching out, @kaan84 , and I'm glad to hear the TrOCR-Sinhala model and dataset are useful for your research!
I can confirm that TrOCR-Sinhala is released under the MIT License. I have updated the model card tags and added the license to the repository so it's officially reflected on Hugging Face.
Best of luck with your OCR research!
Best,
Ransaka