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