first-ai-app / app.py
neha-ai-playground's picture
Update app.py
e883ca8
raw
history blame
353 Bytes
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)
st.json(out)
if query:
out = pipe(query)
st.json(out)