maniveer's picture
Update app.py
1ba0e45
raw
history blame
428 Bytes
import streamlit as st
from transformers import pipeline
st.title("AI Community 9th Dec Workshop designing sentiment analysis Bot")
sentiment_analysis = pipeline("sentiment-analysis")
#user input
user_input = st.text_area("Enter the comment to analyze")
#analysis button
if st.button("Analyze"):
result = sentiment_analysis(user_input)
st.write("Sentiment", result[0]['label'])
st.write("Score", result[0]['score'])