Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,44 @@
|
|
1 |
-
---
|
2 |
-
license: mit
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
pipeline_tag: text-classification
|
4 |
+
---
|
5 |
+
|
6 |
+
# Fine-tuned RoBERTa for Sentiment Analysis on Amazon Reviews
|
7 |
+
|
8 |
+
This is a fine-tuned version of [cardiffnlp/twitter-roberta-base-sentiment-latest](https://huggingface.co/cardiffnlp/twitter-roberta-base-sentiment-latest) on the [Amazon Reviews dataset](https://www.kaggle.com/datasets/bittlingmayer/amazonreviews) for sentiment analysis.
|
9 |
+
|
10 |
+
## Model Details
|
11 |
+
|
12 |
+
- **Model Name:** AnkitAI/reviews-roberta-base-sentiment-analysis
|
13 |
+
- **Base Model:** cardiffnlp/twitter-roberta-base-sentiment-latest
|
14 |
+
- **Dataset:** [Amazon Reviews](https://www.kaggle.com/datasets/bittlingmayer/amazonreviews)
|
15 |
+
- **Fine-tuning:** This model was fine-tuned for sentiment analysis with a classification head for binary sentiment classification (positive and negative).
|
16 |
+
|
17 |
+
## Training
|
18 |
+
|
19 |
+
The model was trained using the following parameters:
|
20 |
+
|
21 |
+
- **Learning Rate:** 2e-5
|
22 |
+
- **Batch Size:** 16
|
23 |
+
- **Epochs:** 3
|
24 |
+
- **Weight Decay:** 0.01
|
25 |
+
- **Evaluation Strategy:** Epoch
|
26 |
+
|
27 |
+
## Usage
|
28 |
+
|
29 |
+
You can use this model directly with the Hugging Face `transformers` library:
|
30 |
+
|
31 |
+
```python
|
32 |
+
from transformers import RobertaForSequenceClassification, RobertaTokenizer
|
33 |
+
|
34 |
+
model_name = "AnkitAI/reviews-roberta-base-sentiment-analysis"
|
35 |
+
model = RobertaForSequenceClassification.from_pretrained(model_name)
|
36 |
+
tokenizer = RobertaTokenizer.from_pretrained(model_name)
|
37 |
+
|
38 |
+
# Example usage
|
39 |
+
inputs = tokenizer("This product is great!", return_tensors="pt")
|
40 |
+
outputs = model(**inputs)
|
41 |
+
```
|
42 |
+
## License
|
43 |
+
|
44 |
+
This model is licensed under the mit license
|