Spaces:
Runtime error
Runtime error
| 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) |