samiulhaq commited on
Commit
c1c05e3
1 Parent(s): fa0b566

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +30 -0
README.md CHANGED
@@ -30,3 +30,33 @@ The evaluation is done on WMT2017 standard test set.
30
  | testset | BLEU |
31
  |-----------------------|-------|
32
  | Wmt2017 | 57.95 |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  | testset | BLEU |
31
  |-----------------------|-------|
32
  | Wmt2017 | 57.95 |
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
+ ```