Spaces:
Sleeping

Sentiment-Analysis / src /streamlit_app.py
syed63m's picture
Upload streamlit_app.py
21cfab8 verified
Raw History Blame Contribute Delete
374 Bytes
import streamlit as st
from transformers import pipeline
sentiment_analysis = pipeline("sentiment-analysis", model = "siebert/sentiment-roberta-large-english")
st.title("Sentiment Analysis")
rev = st.text_input("Enter a review to analyze its sentiments")
analyze = st.button("Analyze")
if analyze:
result = sentiment_analysis(rev)[0]['label']
st.write(result)