Update README.md
Browse files
README.md
CHANGED
|
@@ -319,6 +319,7 @@ print("Prediction:", pred_class)
|
|
| 319 |
### Example 3: Text–Text Inference (Ported SONAR)
|
| 320 |
|
| 321 |
```python
|
|
|
|
| 322 |
import torch
|
| 323 |
from transformers import AutoTokenizer, AutoModel
|
| 324 |
from transformers.models.m2m_100.modeling_m2m_100 import M2M100Encoder
|
|
@@ -365,7 +366,7 @@ print("Prediction:", pred_class)
|
|
| 365 |
You can use the BLASER semantic score in combination with the MMNLI NLI class to get a **better understanding of the relationship** between source and candidate translations. The NLI class gives the entailment/contradiction/neutral label, while the BLASER score provides a fine-grained semantic similarity.
|
| 366 |
|
| 367 |
```python
|
| 368 |
-
|
| 369 |
import torch
|
| 370 |
from transformers import AutoTokenizer, AutoModel
|
| 371 |
from transformers.models.m2m_100.modeling_m2m_100 import M2M100Encoder
|
|
|
|
| 319 |
### Example 3: Text–Text Inference (Ported SONAR)
|
| 320 |
|
| 321 |
```python
|
| 322 |
+
# !pip install transformers sentencepiece torch -q
|
| 323 |
import torch
|
| 324 |
from transformers import AutoTokenizer, AutoModel
|
| 325 |
from transformers.models.m2m_100.modeling_m2m_100 import M2M100Encoder
|
|
|
|
| 366 |
You can use the BLASER semantic score in combination with the MMNLI NLI class to get a **better understanding of the relationship** between source and candidate translations. The NLI class gives the entailment/contradiction/neutral label, while the BLASER score provides a fine-grained semantic similarity.
|
| 367 |
|
| 368 |
```python
|
| 369 |
+
# !pip install transformers sentencepiece torch -q
|
| 370 |
import torch
|
| 371 |
from transformers import AutoTokenizer, AutoModel
|
| 372 |
from transformers.models.m2m_100.modeling_m2m_100 import M2M100Encoder
|