import streamlit as st import transformers from transformers import pipeline import numpy as np st.title("SENTIMENT ANALYSIS") text = st.text_input("Enter your Text") pipe = pipeline("sentiment-analysis") output = pipe(text) label = output[0]['label'] score = round(output[0]['score'],2)*100 # if label == "POSITVE": # p_score = score # n_score = 100 - p_score # else: # n_score = score # p_score = 100 - n_score st.write(f"{label} : SCORE = {round(score)}% ")