decodingdatascience's picture
Create app.py
e2538ff
raw
history blame contribute delete
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'])