Update README.md
Browse files
README.md
CHANGED
@@ -27,6 +27,23 @@ model-index:
|
|
27 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
28 |
should probably proofread and complete it, then remove this comment. -->
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
# bengali-bn-to-en
|
31 |
|
32 |
This model is a fine-tuned version of [Helsinki-NLP/opus-mt-bn-en](https://huggingface.co/Helsinki-NLP/opus-mt-bn-en) on the kde4 dataset.
|
|
|
27 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
28 |
should probably proofread and complete it, then remove this comment. -->
|
29 |
|
30 |
+
### How to use
|
31 |
+
|
32 |
+
You can use this model directly with a pipeline:
|
33 |
+
|
34 |
+
'''python
|
35 |
+
from transformers import AutoTokenizer, pipeline
|
36 |
+
tokenizer = AutoTokenizer.from_pretrained("shihab17/bengali-bn-to-en")
|
37 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("shihab17/bengali-bn-to-en")
|
38 |
+
|
39 |
+
sentence = 'ম্যাচ শেষে পুরস্কার বিতরণের মঞ্চে তামিমের মুখে মোস্তাফিজের প্রশংসা শোনা গেল'
|
40 |
+
|
41 |
+
translator = pipeline("translation_bn_to_en", model=model, tokenizer=tokenizer)
|
42 |
+
output = translator(sentence)
|
43 |
+
print(output)
|
44 |
+
'''
|
45 |
+
|
46 |
+
|
47 |
# bengali-bn-to-en
|
48 |
|
49 |
This model is a fine-tuned version of [Helsinki-NLP/opus-mt-bn-en](https://huggingface.co/Helsinki-NLP/opus-mt-bn-en) on the kde4 dataset.
|