Spaces:
Runtime error
Runtime error
File size: 306 Bytes
ada193e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
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) |