Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from transformers import pipeline
|
| 2 |
+
classifier = pipeline("zero-shot-classification", model="facebook/bart-large-mnli")
|
| 3 |
+
|
| 4 |
+
categories = ['lifestyle', 'technology', 'entertainment', 'news']
|
| 5 |
+
classifier(text, categories, multi_class=True)
|