Translation
RicardoRei commited on
Commit
82c3832
1 Parent(s): e2f7998

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +18 -7
README.md CHANGED
@@ -137,18 +137,29 @@ model_path = download_model("Unbabel/unite-mup")
137
  model = load_from_checkpoint(model_path)
138
  data = [
139
  {
140
- "src": "Dem Feuer konnte Einhalt geboten werden",
141
- "mt": "The fire could be stopped",
142
- "ref": "They were able to control the fire."
143
  },
144
  {
145
- "src": "Schulen und Kindergärten wurden eröffnet.",
146
- "mt": "Schools and kindergartens were open",
147
- "ref": "Schools and kindergartens opened"
148
  }
149
  ]
150
  model_output = model.predict(data, batch_size=8, gpus=1)
151
- print (model_output)
 
 
 
 
 
 
 
 
 
 
 
152
  ```
153
 
154
  # Intended uses
 
137
  model = load_from_checkpoint(model_path)
138
  data = [
139
  {
140
+ "src": "这是个句子。",
141
+ "mt": "This is a sentence.",
142
+ "ref": "It is a sentence."
143
  },
144
  {
145
+ "src": "这是另一个句子。",
146
+ "mt": "This is another sentence.",
147
+ "ref": "It is another sentence."
148
  }
149
  ]
150
  model_output = model.predict(data, batch_size=8, gpus=1)
151
+
152
+ # Expected SRC score:
153
+ # [0.3474583327770233, 0.4492775797843933]
154
+ print (model_output.metadata.src_scores)
155
+
156
+ # Expected REF score:
157
+ # [0.9252626895904541, 0.899452269077301]
158
+ print (model_output.metadata.ref_scores)
159
+
160
+ # Expected UNIFIED score:
161
+ # [0.8758717179298401, 0.8294666409492493]
162
+ print (model_output.metadata.unified_scores)
163
  ```
164
 
165
  # Intended uses