Sentiments / app.py
SamirSengupta's picture
update
d59b3c4
import streamlit as st
from transformers import pipeline
pipe = pipeline('sentiment-analysis')
st.write('SENTIMENTAL ANALYIS')
text = st.text_area('Enter text')
if text:
out = pipe(text)
label = out[0]['label']
score = out[0]['score']
st.write('Label: ', label)
st.write('Score: ', score)