maniveer's picture
Update app.py
6907487
raw
history blame
399 Bytes
import streamlit as st
from transformers import pipeline
st.title("AI Community 9th Dec Workshop 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'])