File size: 696 Bytes
1517954 3d30b0b 1517954 e38cf2c 1517954 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
---
library_name: transformers
pipeline_tag: translation
language:
- bn
---
### How to use
You can use this model directly with a pipeline:
```python
from transformers import AutoTokenizer, pipeline
tokenizer = AutoTokenizer.from_pretrained("shihab17/bengali-bn-to-en")
model = AutoModelForSeq2SeqLM.from_pretrained("shihab17/bengali-bn-to-en")
sentence = 'ম্যাচ শেষে পুরস্কার বিতরণের মঞ্চে তামিমের মুখে মোস্তাফিজের প্রশংসা শোনা গেল'
translator = pipeline("translation_bn_to_en", model=model, tokenizer=tokenizer)
output = translator(sentence)
print(output)
``` |