File size: 368 Bytes
cb78b51 7ef76fe cb78b51 7ef76fe |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
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)
|