File size: 259 Bytes
ec7b781
 
 
 
 
 
2fb65f7
 
1
2
3
4
5
6
7
8
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:")
if st.button("OK"):
    st.write(classifier(text))