chrismay's picture
Update app.py
6aacc74
raw
history blame
364 Bytes
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)