Downloads · 30 days
8
1% of all-time downloads
Mr-Vicky-01/Fine_tune_english_to_tamil
Fine_tune_english_to_tamil is a machine learning model from Mr-Vicky-01. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
Downloads · 30 days
8
1% of all-time downloads
All-time downloads
623
Public
Parameters
484M
1.9 GB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors1.9 GB · 100%
From the Hugging Face model README
def language_translator(text):
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
model = AutoModelForSeq2SeqLM.from_pretrained("finetune-EN-to-Ta/")
# model = AutoModelForSeq2SeqLM.from_pretrained("finetune-EN-to-Ta/")
tokenized = tokenizer([text], return_tensors='pt')
out = model.generate(**tokenized, max_length=128)
with tokenizer.as_target_tokenizer():
return tokenizer.decode(out[0],skip_special_tokens=True)
text_to_translate = "How are you?"
output = language_translator(text_to_translate)
print(output)