Update README.md
Browse files
README.md
CHANGED
|
@@ -53,10 +53,10 @@ classifier(sequence_to_classify, candidate_labels)
|
|
| 53 |
The default hypothesis template is the English, `This text is {}`. With this model better results are achieving when providing a translated template:
|
| 54 |
```python
|
| 55 |
sequence_to_classify = "La Sardegna è una regione italiana a statuto speciale di 1 592 730 abitanti con capoluogo Cagliari, la cui denominazione bilingue utilizzata nella comunicazione ufficiale è Regione Autonoma della Sardegna / Regione Autònoma de Sardigna."
|
| 56 |
-
candidate_labels = ["geografia", "politica", "macchine", "cibo", "moda"]
|
| 57 |
hypothesis_template = "si parla di {}"
|
| 58 |
-
classifier(sequence_to_classify, candidate_labels, hypothesis_template=hypothesis_template)
|
| 59 |
-
'scores': [0.6068345904350281, 0.34715887904167175, 0.32433947920799255, 0.3068877160549164, 0.18744681775569916]}
|
| 60 |
```
|
| 61 |
#### With manual PyTorch
|
| 62 |
```python
|
|
|
|
| 53 |
The default hypothesis template is the English, `This text is {}`. With this model better results are achieving when providing a translated template:
|
| 54 |
```python
|
| 55 |
sequence_to_classify = "La Sardegna è una regione italiana a statuto speciale di 1 592 730 abitanti con capoluogo Cagliari, la cui denominazione bilingue utilizzata nella comunicazione ufficiale è Regione Autonoma della Sardegna / Regione Autònoma de Sardigna."
|
| 56 |
+
candidate_labels = ["geografia", "politica", "macchine", "cibo", "moda"]
|
| 57 |
hypothesis_template = "si parla di {}"
|
| 58 |
+
# classifier(sequence_to_classify, candidate_labels, hypothesis_template=hypothesis_template)
|
| 59 |
+
# 'scores': [0.6068345904350281, 0.34715887904167175, 0.32433947920799255, 0.3068877160549164, 0.18744681775569916]}
|
| 60 |
```
|
| 61 |
#### With manual PyTorch
|
| 62 |
```python
|