|
--- |
|
language: en |
|
license: mit |
|
--- |
|
|
|
# Model Card |
|
Bank Sentiment Classifier - distilBERT |
|
Developed by: Richard Chai, https://www.linkedin.com/in/richardchai/ |
|
|
|
This model has been fine-tuned for Bank User Sentiment Identification. |
|
Currently, it identifies the following Sentiment: |
|
|
|
'very negative': 0, |
|
'negative': 1, |
|
'neutral': 2, |
|
'positive': 3, |
|
'very positive': 4 |
|
|
|
|
|
## Model Details |
|
- **Model type**: Transformer-based (e.g., BERT, DistilBERT, etc.): distilBERT |
|
- **Dataset**: Stanford Sentiment Treebank SST-5 or another sentiment dataset |
|
- **Fine-tuning**: The model was fine-tuned for X epochs using a learning rate of Y on a dataset with Z samples. |
|
|
|
|
|
## Usage |
|
You can use this model to classify text sentiment as follows: |
|
|
|
```python |
|
from transformers import pipeline |
|
|
|
# Check if GPU is available |
|
device = 0 if torch.cuda.is_available() else -1 |
|
|
|
model_checkpt = "richardchai/plp_sentiment_clr_distilbert" |
|
clf = pipeline('text-classification', model="model_trained/distilbert", device=device) |
|
result = clf(f"['please tell me more about your fixed deposit.', 'your savings rate is terrible!', 'Yay! I have finally paid off my loan!', 'I am rich, hurray!']") |
|
print(result) |
|
``` |
|
|
|
|