firstApp / app.py
anujkumar4's picture
Update app.py
4dab67e verified
raw
history blame contribute delete
240 Bytes
import streamlit as st
from transformers import pipeline
@st.cache_resource
def load_model():
return pipeline("sentiment-analysis")
classifier = load_model()
text = st.text_input("Enter text")
if text:
st.write(classifier(text))