Update README.md
Browse files
README.md
CHANGED
@@ -52,12 +52,6 @@ You can then use this pipeline to classify sequences into any of the class names
|
|
52 |
sequence_to_classify = "Angela Merkel ist eine Politikerin in Deutschland und Vorsitzende der CDU"
|
53 |
candidate_labels = ["politics", "economy", "entertainment", "environment"]
|
54 |
classifier(sequence_to_classify, candidate_labels)
|
55 |
-
#{'sequence': 'Angela Merkel ist eine Politikerin in Deutschland und Vorsitzende der CDU',
|
56 |
-
# 'labels': ['politics', 'economy', 'environment', 'entertainment'],
|
57 |
-
# 'scores': [0.4656517505645752,
|
58 |
-
# 0.20842939615249634,
|
59 |
-
# 0.1871575266122818,
|
60 |
-
# 0.13876137137413025]}
|
61 |
```
|
62 |
|
63 |
If more than one candidate label can be correct, pass `multi_class=True` to calculate each class independently:
|
@@ -65,12 +59,6 @@ If more than one candidate label can be correct, pass `multi_class=True` to calc
|
|
65 |
```python
|
66 |
candidate_labels = ["politics", "economy", "entertainment", "environment"]
|
67 |
classifier(sequence_to_classify, candidate_labels, multi_label=True)
|
68 |
-
#{'sequence': 'Angela Merkel ist eine Politikerin in Deutschland und Vorsitzende der CDU',
|
69 |
-
# 'labels': ['politics', 'economy', 'environment', 'entertainment'],
|
70 |
-
# 'scores': [0.7586008906364441,
|
71 |
-
# 0.3599490225315094,
|
72 |
-
# 0.3004348874092102,
|
73 |
-
# 0.1562490165233612]}
|
74 |
```
|
75 |
|
76 |
### Eval results
|
|
|
52 |
sequence_to_classify = "Angela Merkel ist eine Politikerin in Deutschland und Vorsitzende der CDU"
|
53 |
candidate_labels = ["politics", "economy", "entertainment", "environment"]
|
54 |
classifier(sequence_to_classify, candidate_labels)
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
```
|
56 |
|
57 |
If more than one candidate label can be correct, pass `multi_class=True` to calculate each class independently:
|
|
|
59 |
```python
|
60 |
candidate_labels = ["politics", "economy", "entertainment", "environment"]
|
61 |
classifier(sequence_to_classify, candidate_labels, multi_label=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
```
|
63 |
|
64 |
### Eval results
|