sentiment_bot / app.py
avimittal30's picture
Create app.py
aeec8d2 verified
raw
history blame
No virus
508 Bytes
import streamlit as st
from transformers import pipeline
st.title("Sentiment Bot")
Sentiment_pipeline=pipeline("sentiment-analysis")
user_input=st.text_area("Enter the review")
user_input="I absolutely loved the new movie, it had me on the edge of my seat the whole time!"
if st.button("Analyse:"):
result=Sentiment_pipeline(user_input)
# print(result[0]['label'])
# print(result[0]['score'])
st.write("Sentiment", result[0]['label'])
st.write("Confidence Score", result[0]['score'])