import streamlit as st from transformers import pipeline pipe = pipeline('sentiment-analysis') st.title('Sentiment Analysis') query = st.text_area('enter some text - It will return the sentiment of the entered text Negative/Positive :', 'I love you') button = st.button('Submit', key='button') if button: out = pipe(query) st.json(out)