Downloads · 30 days
15
9% of all-time downloads
prajjwal888/roberta-finetuned-review-classifier
roberta-finetuned-review-classifier is a text classification model from prajjwal888. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
This is a fine-tuned RoBERTa model built for binary sentiment classification of Amazon product reviews. The model classifies reviews into LABEL0 (negative) or LABEL1 (positive), and has been integrated into a Chrome e…
Downloads · 30 days
15
9% of all-time downloads
All-time downloads
159
Public
Parameters
125M
499 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors499 MB · 99%
From the Hugging Face model README
This is a fine-tuned RoBERTa model built for binary sentiment classification of Amazon product reviews. The model classifies reviews into LABEL_0 (negative) or LABEL_1 (positive), and has been integrated into a Chrome extension that predicts numeric ratings based on review text.
LABEL_0: Negative review → (Rating 1–4)LABEL_1: Positive review → (Rating 7–10)roberta-baseYou can use this model to predict sentiment or approximate ratings of customer reviews. It's ideal for:
Can be used in:
Model may inherit biases from training data—especially in underrepresented product categories or reviewer demographics.
from transformers import pipeline
classifier = pipeline("text-classification", model="prajjwal888/roberta-finetuned-review-classifier")
result = classifier("The product quality is fantastic. Loved it!")
print(result)
Example Output:
[{"label": "LABEL_1", "score": 0.9987}]
Custom dataset scraped and labeled from Amazon product reviews. Labeled into two categories based on review sentiment (not star ratings).
| Hyperparameter | Value |
|---|---|
| Epochs | 3 |
| Batch size | 16 |
| Max length | 512 |
| Optimizer | AdamW |
| Learning rate | 2e-5 |
| Precision | fp16 |
| Metric | Value |
|---|---|
| Accuracy | ~91% |
| F1 Score | ~90.5% |
| Precision | ~90% |
| Recall | ~91% |
Evaluation was performed on a 20% held-out validation set from the same distribution.
transformers)@misc{prajjwal888_review_classifier_2024, title={RoBERTa Fine-Tuned Review Classifier}, author={Prajjwal Chouhan}, year={2024}, howpublished={\url{https://huggingface.co/prajjwal888/roberta-finetuned-review-classifier}}, }
Thanks to the Hugging Face community and the creators of roberta-base. This project is inspired by practical applications of NLP in e-commerce.