π’ DistilBERT Fine-Tuned for Sentiment Analysis π
This model is a fine-tuned DistilBERT for sentiment analysis on movie review texts. It classifies texts as positive or negative with high accuracy.
π Dataset
The model was trained on the IMDb dataset, which contains 50,000 movie reviews balanced between positive and negative labels.
π Evaluation
The model's performance was evaluated on a test set of 25,000 reviews, achieving the following results:
Metric | Value |
---|---|
Accuracy | 93.2% |
Precision | 93% |
Recall | 93% |
F1-score | 93% |
These metrics indicate that the model correctly predicts movie reviews in most cases.
π Confusion Matrix
The confusion matrix below shows the model's performance on predictions:
π How to Use
To use the model, simply load it with transformers
and use the text classification pipeline:
from transformers import pipeline
model_name = "gabrielnkl/fine-tuned-bert"
classifier = pipeline("text-classification", model=model_name)
text = "This movie was amazing! I really liked the acting and the storyline."
result = classifier(text)
print(result)
# [{'label': 'POSITIVE', 'score': 0.98}]
O notebook usado para treinar este modelo estΓ‘ disponΓvel no GitHub:
(https://github.com/Gabrielnkl/fine-tuned-bert-model/blob/main/finetuning.py)
- Downloads last month
- 11
Inference Providers
NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API:
The model has no library tag.