navjotk's picture
Update app.py
7ef76fe verified
raw
history blame contribute delete
368 Bytes
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)