Downloads · 30 days
5
16% of all-time downloads
sumanthmandavalli/english-to-tamil
english-to-tamil is a machine learning model from sumanthmandavalli. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
cense: cc0-1.0 --- A model that translates English sentences to Tamil.
Downloads · 30 days
5
16% of all-time downloads
All-time downloads
31
Public
Parameters
484M
1.9 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.9 GB · 100%
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 = "sumanthmandavalli/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 = "WELOCOME TO AI WORLD" # Sentence to translate
output = language_translator(text_to_translate)
print(output) # இது ஒரு சோதனை வழக்கு.