Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,9 +10,9 @@ st.caption("This is a very simple demo application for a zero-shot classificatio
|
|
| 10 |
# pipe = pipeline('sentiment-analysis')
|
| 11 |
@st.cache
|
| 12 |
def load_model():
|
| 13 |
-
return
|
| 14 |
|
| 15 |
-
classifier = pipeline("zero-shot-classification", model=
|
| 16 |
|
| 17 |
text = st.text_area('Enter text here!')
|
| 18 |
candidate_labels = ['Positive', 'Neutral', 'Negative']
|
|
|
|
| 10 |
# pipe = pipeline('sentiment-analysis')
|
| 11 |
@st.cache
|
| 12 |
def load_model():
|
| 13 |
+
return nlimodel = AutoModelForSequenceClassification.from_pretrained('facebook/bart-large-mnli')
|
| 14 |
|
| 15 |
+
classifier = pipeline("zero-shot-classification", model=nlimodel)
|
| 16 |
|
| 17 |
text = st.text_area('Enter text here!')
|
| 18 |
candidate_labels = ['Positive', 'Neutral', 'Negative']
|