Update README.md (#22)
Browse files- Update README.md (2ce57c184aab62bc6ee5fe4f17192f57c185c569)
Co-authored-by: Rian Dolphin <[email protected]>
README.md
CHANGED
|
@@ -43,11 +43,11 @@ classifier(sequence_to_classify, candidate_labels)
|
|
| 43 |
# 'sequence': 'one day I will see the world'}
|
| 44 |
```
|
| 45 |
|
| 46 |
-
If more than one candidate label can be correct, pass `
|
| 47 |
|
| 48 |
```python
|
| 49 |
candidate_labels = ['travel', 'cooking', 'dancing', 'exploration']
|
| 50 |
-
classifier(sequence_to_classify, candidate_labels,
|
| 51 |
#{'labels': ['travel', 'exploration', 'dancing', 'cooking'],
|
| 52 |
# 'scores': [0.9945111274719238,
|
| 53 |
# 0.9383890628814697,
|
|
|
|
| 43 |
# 'sequence': 'one day I will see the world'}
|
| 44 |
```
|
| 45 |
|
| 46 |
+
If more than one candidate label can be correct, pass `multi_label=True` to calculate each class independently:
|
| 47 |
|
| 48 |
```python
|
| 49 |
candidate_labels = ['travel', 'cooking', 'dancing', 'exploration']
|
| 50 |
+
classifier(sequence_to_classify, candidate_labels, multi_label=True)
|
| 51 |
#{'labels': ['travel', 'exploration', 'dancing', 'cooking'],
|
| 52 |
# 'scores': [0.9945111274719238,
|
| 53 |
# 0.9383890628814697,
|