import streamlit as st from transformers import pipeline # Initialize the sentiment analysis pipeline pipe = pipeline('sentiment-analysis') # Create a text input area in the Streamlit app text = st.text_area('Enter some text!') # Process the text and display the results if there's input if text: out = pipe(text) st.json(out)