demo_for_IE / app.py
Daniel Vila
Create new file
ada193e
import streamlit as st
from transformers import pipeline
@st.cache(allow_output_mutation=True)
def load_model():
return pipeline("sentiment-analysis")
nlp = load_model()
user_text = st.text_area(label="Input your text here!")
if user_text:
predictions = nlp(user_text)
st.write(predictions)