samiulhaq commited on
Commit
09e84ad
1 Parent(s): e5d8584

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +34 -4
README.md CHANGED
@@ -11,13 +11,13 @@ library_name: fairseq
11
  pipeline_tag: translation
12
  ---
13
 
14
- ### English to Urdu Translation
15
  Urdu to English translation model is a Transformer model trained on IWSLT back-translated data using Faireq.
16
  This model is produced during the experimentation related to building Context-Aware NMT models for low-resourced languages such as Urdu, Hindi, Sindhi, Pashtu and Punjabi. This particular model does not contains any contextual information and it is baseline sentence-level transformer model.
17
  The evaluation is done on WMT2017 standard test set.
18
 
19
- * source group: Urdu
20
- * target group: English
21
 
22
  * model: transformer
23
  * Contextual
@@ -29,4 +29,34 @@ The evaluation is done on WMT2017 standard test set.
29
 
30
  | testset | BLEU |
31
  |-----------------------|-------|
32
- | Wmt2017 | 57.95 |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  pipeline_tag: translation
12
  ---
13
 
14
+ ### Urdu to English Translation
15
  Urdu to English translation model is a Transformer model trained on IWSLT back-translated data using Faireq.
16
  This model is produced during the experimentation related to building Context-Aware NMT models for low-resourced languages such as Urdu, Hindi, Sindhi, Pashtu and Punjabi. This particular model does not contains any contextual information and it is baseline sentence-level transformer model.
17
  The evaluation is done on WMT2017 standard test set.
18
 
19
+ * source group: English
20
+ * target group: Urdu
21
 
22
  * model: transformer
23
  * Contextual
 
29
 
30
  | testset | BLEU |
31
  |-----------------------|-------|
32
+ | Wmt2017 | 50.03 |
33
+
34
+ ## How to use model?
35
+ * This model can be accessed via git clone:
36
+ ```
37
+ git clone https://huggingface.co/samiulhaq/iwslt-bt-en-ur
38
+ ```
39
+ * You can use Fairseq library to access the model for translations:
40
+ ```
41
+ from fairseq.models.transformer import TransformerModel
42
+ ```
43
+
44
+ ### Load the model
45
+ ```
46
+ model = TransformerModel.from_pretrained('path/to/model')
47
+
48
+ ```
49
+
50
+ #### Set the model to evaluation mode
51
+ ```
52
+ model.eval()
53
+ ```
54
+
55
+ #### Perform inference
56
+ ```
57
+ input_text = 'Hello, how are you?'
58
+
59
+ output_text = model.translate(input_text)
60
+
61
+ print(output_text)
62
+ ```