|
|
--- |
|
|
tags: |
|
|
- sentiment-analysis |
|
|
- text-classification |
|
|
- distilbert |
|
|
license: mit |
|
|
datasets: |
|
|
- imdb |
|
|
metrics: |
|
|
- accuracy |
|
|
model-index: |
|
|
- name: sentiment-classifier |
|
|
results: |
|
|
- task: |
|
|
type: text-classification |
|
|
dataset: |
|
|
name: imdb |
|
|
type: imdb |
|
|
metrics: |
|
|
- name: Accuracy |
|
|
type: accuracy |
|
|
value: 0.92 |
|
|
--- |
|
|
|
|
|
# Sentiment Classifier |
|
|
|
|
|
## Overview |
|
|
|
|
|
This is a fine-tuned DistilBERT model for sentiment analysis on text data. It classifies input text as either positive or negative sentiment. The model was trained on the IMDB dataset and achieves high accuracy on movie reviews and similar text. |
|
|
|
|
|
## Model Architecture |
|
|
|
|
|
- Base Model: DistilBERT |
|
|
- Layers: 6 |
|
|
- Hidden Size: 768 |
|
|
- Attention Heads: 12 |
|
|
- Fine-tuned for binary classification (positive/negative) |
|
|
|
|
|
## Intended Use |
|
|
|
|
|
This model is intended for sentiment analysis tasks, such as analyzing customer reviews, social media posts, or any textual feedback to determine overall sentiment. |
|
|
|
|
|
## Limitations |
|
|
|
|
|
- The model is trained primarily on English text and may not perform well on other languages. |
|
|
- It may struggle with sarcasm, irony, or nuanced sentiments. |
|
|
- Input text longer than 512 tokens will be truncated. |
|
|
|
|
|
## Example Code |
|
|
|
|
|
```python |
|
|
from transformers import pipeline |
|
|
|
|
|
classifier = pipeline("sentiment-analysis", model="user/sentiment-classifier") |
|
|
result = classifier("I love this product!") |
|
|
print(result) |
|
|
# [{'label': 'POSITIVE', 'score': 0.99}] |