Spaces:
Runtime error
Runtime error
File size: 364 Bytes
be86868 8a8dc07 6aacc74 8a8dc07 6aacc74 8a8dc07 6aacc74 8a8dc07 be86868 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import streamlit as st
from transformers import pipeline
# pipe = pipeline('sentiment-analysis')
pipe = pipeline("zero-shot-classification", model="facebook/bart-large-mnli")
text = st.text_area('Enter text here!')
candidate_labels = ['Positive', 'Neutral', 'Negative']
classifier = classifier(text, candidate_labels)
if text:
out = pipe(text)
st.json(out) |