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