File size: 344 Bytes
26455a4
 
0656c3e
998fae1
e545d03
e883ca8
 
a30c4ee
8857191
1
2
3
4
5
6
7
8
9
10
import streamlit as st
from transformers import pipeline
pipe = pipeline('sentiment-analysis')
st.title('Sentiment Analysis')
query = st.text_area('enter some text - It will return the sentiment of the entered text Negative/Positive :', 'I love you')
button = st.button('Submit', key='button')
if button:
    out = pipe(query)
    st.json(out)