Downloads · 30 days
40
1% of all-time downloads
Meher2006/english-to-telugu-model
english-to-telugu-model is a translation model from Meher2006. 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 translates English text to Telugu using a fine-tuned transformer model. It is designed for general-purpose translation and supports a wide range of vocabulary and sentence structures.
Downloads · 30 days
40
1% of all-time downloads
All-time downloads
3.8K
Public
Parameters
611M
4.9 GB on disk
Likes
3
Public
Click a slice to open those files.
.bin2.4 GB · 50%
From the Hugging Face model README
This model translates English text to Telugu using a fine-tuned transformer model. It is designed for general-purpose translation and supports a wide range of vocabulary and sentence structures.
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
# Load the model and tokenizer
model_name = "Meher2006/english-to-telugu-model"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
# Function to translate text
def translate(text):
inputs = tokenizer(text, return_tensors="pt")
outputs = model.generate(**inputs)
return tokenizer.decode(outputs[0], skip_special_tokens=True)
# Example Usage
sentences = [
"Hello, how are you?", # Output: హలో, మీరు ఎలా ఉన్నారు?
"What is your name?", # Output: మీ పేరు ఏమిటి?
"I enjoy learning new languages.", # Output: నాకు కొత్త భాషలు నేర్చుకోవడం ఇష్టం.
"Please help me with this task.", # Output: దయచేసి ఈ పనిలో నాకు సహాయపడండి.
"Thank you.", # Output: ధన్యవాదాలు.
"How are you doing?" # Output: నువ్వు ఎలా ఉన్నావు?
]
for sentence in sentences:
print(f"English: {sentence}")
print(f"Telugu: {translate(sentence)}")
print("----")