Classifies English text as positive or negative. DistilBERT fine-tuned on the Stanford Sentiment Treebank.
About
distilbert-base-uncased fine-tuned on SST-2, the binary sentiment split of the Stanford Sentiment Treebank. It labels a sentence POSITIVE or NEGATIVE with a confidence score. The original model card reports 91.3% accuracy on the SST-2 development set.
Use it
from transformers import pipeline
classify = pipeline("sentiment-analysis", model="distilbert/distilbert-base-uncased-finetuned-sst-2-english")
classify("The download was quick and the data was clean.")
Limitations
It was trained on movie-review sentences and can be unreliable on other domains, sarcasm and neutral text (it always answers positive or negative). The original model card documents biased predictions for some country names — test it on your own data before relying on it.
Licence
Apache-2.0. Files link to the original repository on Hugging Face.