File size: 660 Bytes
22c4d45 9d398ee 22c4d45 b37a82f 22c4d45 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
---
license: cc0-1.0
---
A model that translates English sentences to Telugu.
To use this model, use the following code:
```python
from transformers import MBartForConditionalGeneration, MBart50TokenizerFast
model_checkpoint = "aryaumesh/english-to-telugu"
tokenizer = MBart50TokenizerFast.from_pretrained(model_checkpoint)
model = MBartForConditionalGeneration.from_pretrained(model_checkpoint)
text = "This is a test case." # Sentence to translate
inputs = tokenizer(text, return_tensors="pt")
outputs = model.generate(**inputs)
print(tokenizer.decode(outputs[0], skip_special_tokens=True)) # ఈ ఒక పరీక్ష కేసు ఉంది.
``` |