space1 / example1.py
madani's picture
Upload example1.py
80110c7
raw history blame
No virus
235 Bytes
import streamlit as st
from transformers import pipeline
model="distilbert-base-uncased-finetuned-sst-2-english"
classifier = pipeline("sentiment-analysis", model=model)
text = st.text_input("Input a text:")
st.write(classifier(text))