import streamlit as st from transformers import pipeline classifier = pipeline("sentiment-analysis", model="distilbert-base-uncased-finetuned-sst-2-english") text = st.text_area('enter some text:') if text: results = classifier([text]) st.json(out)