import streamlit as st | |
from transformers import pipeline | |
# Load sentiment analysis pipeline | |
pipe = pipeline('sentiment-analysis') | |
# Streamlit UI | |
st.title("π Sentiment Analysis App") | |
text = st.text_area("Enter your text here:") | |
if text: | |
with st.spinner("Analyzing..."): | |
result = pipe(text) | |
st.subheader("π Result:") | |
st.json(result) | |