Update README.md
Browse files
README.md
CHANGED
@@ -1,61 +1,73 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
-
|
4 |
-
|
5 |
-
|
|
|
|
|
6 |
metrics:
|
7 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
model-index:
|
9 |
-
- name: opus-mt-en-
|
10 |
-
results:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
---
|
12 |
|
13 |
-
|
14 |
-
|
15 |
|
16 |
-
|
|
|
|
|
|
|
|
|
17 |
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
- Bleu: 21.613
|
22 |
-
- Gen Len: 21.9459
|
23 |
|
24 |
-
|
|
|
25 |
|
26 |
-
|
27 |
|
28 |
-
|
29 |
|
30 |
-
|
31 |
|
32 |
-
|
|
|
|
|
33 |
|
34 |
-
|
35 |
|
36 |
-
|
37 |
|
38 |
-
|
|
|
39 |
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
- seed: 42
|
45 |
-
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
46 |
-
- lr_scheduler_type: linear
|
47 |
-
- num_epochs: 1
|
48 |
|
49 |
-
|
50 |
-
|
51 |
-
| Training Loss | Epoch | Step | Validation Loss | Bleu | Gen Len |
|
52 |
-
|:-------------:|:-----:|:------:|:---------------:|:------:|:-------:|
|
53 |
-
| 1.9652 | 1.0 | 171895 | 1.8782 | 21.613 | 21.9459 |
|
54 |
-
|
55 |
-
|
56 |
-
### Framework versions
|
57 |
-
|
58 |
-
- Transformers 4.32.1
|
59 |
-
- Pytorch 2.0.1+cu118
|
60 |
-
- Datasets 2.14.4
|
61 |
-
- Tokenizers 0.13.3
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
+
datasets:
|
4 |
+
- opus100
|
5 |
+
language:
|
6 |
+
- bn
|
7 |
+
- en
|
8 |
metrics:
|
9 |
+
- sacrebleu
|
10 |
+
pipeline_tag: translation
|
11 |
+
widget:
|
12 |
+
- text: "Will you come home tonight?"
|
13 |
+
example_title: "Example 1"
|
14 |
+
- text: "I am so sorry this is a day late, guys. Unfortunately, my internet was down so it was out of my control."
|
15 |
+
example_title: "Example 2"
|
16 |
model-index:
|
17 |
+
- name: shhossain/opus-mt-en-to-bn
|
18 |
+
results:
|
19 |
+
- task:
|
20 |
+
type: translation
|
21 |
+
name: Translation
|
22 |
+
dataset:
|
23 |
+
type: opus100
|
24 |
+
name: opus100
|
25 |
+
split: validation
|
26 |
+
metrics:
|
27 |
+
- type: Bleu
|
28 |
+
value: 12.537400
|
29 |
+
- type: Validation Loss
|
30 |
+
value: 2.120669
|
31 |
+
- type: Training Loss
|
32 |
+
value: 1.771200
|
33 |
---
|
34 |
|
35 |
+
# English-Bengali Translation Model
|
36 |
+
This model is finetuned on `Helsinki-NLP/opus-mt-en-inc` for English to Bangla Translation.
|
37 |
|
38 |
+
- **Developed by:** [shhossain](https://github.com/shhossain)
|
39 |
+
- **Model type:** [transformer-align]
|
40 |
+
- **Language(s) (NLP):** [English, Bengali]
|
41 |
+
- **License:** [apache-2.0]
|
42 |
+
- **Finetuned from model [Helsinki-NLP/opus-mt-en-inc]:** [Helsinki-NLP/opus-mt-en-inc](Helsinki-NLP/opus-mt-en-inc)
|
43 |
|
44 |
+
## Use with transformers
|
45 |
+
```python
|
46 |
+
from transformers import pipeline
|
|
|
|
|
47 |
|
48 |
+
pipe = pipeline("translation", model="shhossain/opus-mt-en-to-bn")
|
49 |
+
```
|
50 |
|
51 |
+
## Use with BanglaTranslationKit
|
52 |
|
53 |
+
BanglaTranslationKit is an open-source translation package for offline conversion between both Bengali and English languages (English to Bangla and Bangla to English)
|
54 |
|
55 |
+
### Installation
|
56 |
|
57 |
+
```bash
|
58 |
+
pip install bntrans
|
59 |
+
```
|
60 |
|
61 |
+
### Usage
|
62 |
|
63 |
+
You can use this package to translate any Bangla to English or English to Bangla.
|
64 |
|
65 |
+
```python
|
66 |
+
from bntrans import Translator
|
67 |
|
68 |
+
translator = Translator(src="en", dest="bn")
|
69 |
+
translation = translator.translate("Hello world!") # ্যালো বিশ্ব!
|
70 |
+
print(translation)
|
71 |
+
```
|
|
|
|
|
|
|
|
|
72 |
|
73 |
+
More info on [BanglaTranslationKit](https://github.com/shhossain/BanglaTranslationKit)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|