Downloads · 30 days
19
1% of all-time downloads
HariSekhar/Eng_Marathi_translation
Eng_Marathi_translation is a translation model from HariSekhar. Use it when you need text moved from one language to another. It is set up for transformers. The card lists the license as apache-2.0.
This model is designed to translate text from English to Marathi using a custom-trained Transformer model.
Downloads · 30 days
19
1% of all-time downloads
All-time downloads
1.5K
Public
Repo size
60.1 MB
Likes
0
Public
Click a slice to open those files.
.bin30.1 MB · 100%
From the Hugging Face model README
This model is designed to translate text from English to Marathi using a custom-trained Transformer model.
The Eng_Marathi_translation model is a sequence-to-sequence Transformer model that has been fine-tuned for translating English text to Marathi. It uses a standard Transformer architecture with attention mechanisms that weigh the influence of different parts of the input sentence as the model predicts each word of the output sentence.
Here is how to use this model to translate English text into Marathi in Python:
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("HariSekhar/Eng_Marathi_translation")
model = AutoModelForSeq2SeqLM.from_pretrained("HariSekhar/Eng_Marathi_translation")
text = "Your English text to translate."
inputs = tokenizer.encode(text, return_tensors="pt")
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))