testspace1 / app.py
Jemsbhai's picture
Update app.py
1fc1ae1 verified
import streamlit as st
from transformers import pipeline
pipe = pipeline('sentiment-analysis')
st.title("Hugging Face Sentiment Analysis Spaces Example")
st.subheader("Enter the text you'd like to analyze.")
text = st.text_input('Enter text') #text is stored in this variable
if text:
out = pipe(text)
st.json(out)