pytorch transformer region:us
---
{}
---
# English-to-Telugu Translation Model

This model translates English text into Telugu.

## Usage
```python
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer

model_name = "hima06varshini/english-to-telugu-translation"
model = AutoModelForSeq2SeqLM.from_pretrained(model_name,use_auth_token=token)
tokenizer = AutoTokenizer.from_pretrained(model_name,use_auth_token=token)

def translate(text):
    inputs = tokenizer(text, return_tensors="pt")
    outputs = model.generate(**inputs)
    return tokenizer.decode(outputs[0], skip_special_tokens=True)

text = "Hello, how are you?"
translated_text = translate(text)
print(translate(text))