first-ai-app / app.py
neha-ai-playground's picture
Update app.py
21d7183
raw
history blame
402 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 :", height= 100, key= "query_text")
button = st.button("Submit", key="button")
if button:
out = pipe(text)
st.json(out)
if query:
out = pipe(text)
st.json(out)