Downloads · 30 days
9
1% of all-time downloads
aryaumesh/english-to-tamil
english-to-tamil is a machine learning model from aryaumesh. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as cc0-1.0.
A model that translates English sentences to Tamil.
Downloads · 30 days
9
1% of all-time downloads
All-time downloads
1.6K
Public
Parameters
484M
5.8 GB on disk
Likes
1
Public
Click a slice to open those files.
.pt3.9 GB · 67%
From the Hugging Face model README
A model that translates English sentences to Tamil.
To use this model, use the following code:
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
model_checkpoint = "aryaumesh/english-to-tamil"
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
model = AutoModelForSeq2SeqLM.from_pretrained(model_checkpoint)
def language_translator(text):
tokenized = tokenizer([text], return_tensors='pt')
out = model.generate(**tokenized, max_length=128)
return tokenizer.decode(out[0],skip_special_tokens=True)
text_to_translate = "This is a test case." # Sentence to translate
output = language_translator(text_to_translate)
print(output) # இது ஒரு சோதனை வழக்கு.