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