Update README.md
Browse files
README.md
CHANGED
@@ -41,9 +41,9 @@ classifier = pipeline("zero-shot-classification", model="NbAiLab/nb-bert-base-mn
|
|
41 |
```
|
42 |
You can then use this pipeline to classify sequences into any of the class names you specify.
|
43 |
```python
|
44 |
-
sequence_to_classify = 'Folkehelseinstituttets mest optimistiske anslag er at alle
|
45 |
candidate_labels = ['politikk', 'helse', 'sport', 'religion']
|
46 |
-
hypothesis_template = '
|
47 |
classifier(sequence_to_classify, candidate_labels, hypothesis_template=hypothesis_template, multi_class=True)
|
48 |
|
49 |
# {'labels': ['helse', 'politikk', 'sport', 'religion'],
|
|
|
41 |
```
|
42 |
You can then use this pipeline to classify sequences into any of the class names you specify.
|
43 |
```python
|
44 |
+
sequence_to_classify = 'Folkehelseinstituttets mest optimistiske anslag er at alle voksne er ferdigvaksinert innen midten av september.'
|
45 |
candidate_labels = ['politikk', 'helse', 'sport', 'religion']
|
46 |
+
hypothesis_template = 'Dette eksempelet er {}.'
|
47 |
classifier(sequence_to_classify, candidate_labels, hypothesis_template=hypothesis_template, multi_class=True)
|
48 |
|
49 |
# {'labels': ['helse', 'politikk', 'sport', 'religion'],
|