File size: 399 Bytes
e2538ff |
1 2 3 4 5 6 7 8 9 10 11 12 |
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']) |