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)