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'])