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