File size: 412 Bytes
aeec8d2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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")

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