Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,12 +3,12 @@ import transformers
|
|
| 3 |
from transformers import pipeline
|
| 4 |
|
| 5 |
text = st.text_area("Enter the text here")
|
| 6 |
-
|
| 7 |
candidate_labels = ['travel', 'cooking', 'dancing', 'exploration']
|
| 8 |
-
classifier(text, candidate_labels
|
| 9 |
|
| 10 |
|
| 11 |
if text :
|
| 12 |
-
out =
|
| 13 |
st.json(out)
|
| 14 |
|
|
|
|
| 3 |
from transformers import pipeline
|
| 4 |
|
| 5 |
text = st.text_area("Enter the text here")
|
| 6 |
+
pipe = pipeline("zero-shot-classification",model="facebook/bart-large-mnli")
|
| 7 |
candidate_labels = ['travel', 'cooking', 'dancing', 'exploration']
|
| 8 |
+
classifier(text, candidate_labels)
|
| 9 |
|
| 10 |
|
| 11 |
if text :
|
| 12 |
+
out = pipe(text)
|
| 13 |
st.json(out)
|
| 14 |
|