Sentiment-Analysis / src /streamlit_app.py
Reza110's picture
Upload streamlit_app.py
f368ea0 verified
Raw History Blame Contribute Delete
348 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 sentiment.")
analyze = st.button("Analyze")
if analyze:
st.write(sentiment_analysis(rev)[0]['label'])