David
commited on
Commit
•
e2cc4dd
1
Parent(s):
3cdabfb
Update README.md
Browse files
README.md
CHANGED
@@ -14,3 +14,16 @@ widget:
|
|
14 |
---
|
15 |
# ZERO-SHOT SELECTRA: A zero-shot classifier based on SELECTRA
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
---
|
15 |
# ZERO-SHOT SELECTRA: A zero-shot classifier based on SELECTRA
|
16 |
|
17 |
+
## Usage
|
18 |
+
|
19 |
+
```python
|
20 |
+
from transformers import pipeline
|
21 |
+
classifier = pipeline("zero-shot-classification",
|
22 |
+
model="Recognai/zeroshot_selectra_medium")
|
23 |
+
|
24 |
+
classifier(
|
25 |
+
"El autor se perfila, a los 50 años de su muerte, como uno de los grandes de su siglo",
|
26 |
+
candidate_labels=["cultura", "sociedad", "economia", "salud", "deportes"],
|
27 |
+
hypothesis_template="Este ejemplo es {}."
|
28 |
+
)
|
29 |
+
```
|