Text Classification
Transformers
Safetensors
distilbert
sentiment-analysis
text-embeddings-inference
Instructions to use 38u3u/sentiment-demo-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 38u3u/sentiment-demo-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="38u3u/sentiment-demo-classifier")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("38u3u/sentiment-demo-classifier") model = AutoModelForSequenceClassification.from_pretrained("38u3u/sentiment-demo-classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Sentiment Classification Demo
This repository packages distilbert/distilbert-base-uncased-finetuned-sst-2-english, a public DistilBERT model for binary
English sentiment classification. It predicts POSITIVE or NEGATIVE.
Source and data
The model is sourced from distilbert/distilbert-base-uncased-finetuned-sst-2-english. It was originally fine-tuned on the
SST-2 sentiment task; this assignment re-saves and republishes it and does not
perform additional fine-tuning.
Usage
from transformers import pipeline
classifier = pipeline("text-classification", model="38u3u/sentiment-demo-classifier")
print(classifier("The product is excellent!"))
Limitations
The model is intended for English sentiment examples similar to its training data. It can misclassify sarcasm, mixed sentiment, domain-specific language, and other languages. Predictions should not be treated as objective truth.
- Downloads last month
- 18