File size: 435 Bytes
460c2eb
a1c218c
54f99af
a1c218c
54f99af
a1c218c
888fcf0
a1c218c
460c2eb
aa3cf1a
e7fb57f
a1c218c
cccc7b7
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import streamlit as st
from transformers import pipeline

pipe = pipeline('sentiment-analysis')

st.title("Sentiment Analysis")
st.write("""##### This demo identifies the emotional tone behind a body of text. :sunglasses:""")
text = st.text_area('Enter some text in the box below!')

result = st.button("or click here")
if text or result:
    out = pipe(text)
    st.table(out)
else
    st.error('You did not enter a text, icon="🚨")