Update README.md
Browse files
README.md
CHANGED
|
@@ -1,65 +1,10 @@
|
|
| 1 |
-
|
| 2 |
-
library_name: transformers
|
| 3 |
-
license: apache-2.0
|
| 4 |
-
base_model: distilbert-base-uncased
|
| 5 |
-
tags:
|
| 6 |
-
- generated_from_trainer
|
| 7 |
-
metrics:
|
| 8 |
-
- accuracy
|
| 9 |
-
model-index:
|
| 10 |
-
- name: cyberbullying_classifier
|
| 11 |
-
results: []
|
| 12 |
-
---
|
| 13 |
|
| 14 |
-
|
| 15 |
-
|
| 16 |
|
| 17 |
-
# cyberbullying_classifier
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
- Loss: 0.7639
|
| 22 |
-
- Accuracy: 0.8540
|
| 23 |
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
More information needed
|
| 27 |
-
|
| 28 |
-
## Intended uses & limitations
|
| 29 |
-
|
| 30 |
-
More information needed
|
| 31 |
-
|
| 32 |
-
## Training and evaluation data
|
| 33 |
-
|
| 34 |
-
More information needed
|
| 35 |
-
|
| 36 |
-
## Training procedure
|
| 37 |
-
|
| 38 |
-
### Training hyperparameters
|
| 39 |
-
|
| 40 |
-
The following hyperparameters were used during training:
|
| 41 |
-
- learning_rate: 2e-05
|
| 42 |
-
- train_batch_size: 16
|
| 43 |
-
- eval_batch_size: 16
|
| 44 |
-
- seed: 42
|
| 45 |
-
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 46 |
-
- lr_scheduler_type: linear
|
| 47 |
-
- num_epochs: 5
|
| 48 |
-
|
| 49 |
-
### Training results
|
| 50 |
-
|
| 51 |
-
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
| 52 |
-
|:-------------:|:-----:|:----:|:---------------:|:--------:|
|
| 53 |
-
| 0.235 | 1.0 | 843 | 0.3875 | 0.8540 |
|
| 54 |
-
| 0.2038 | 2.0 | 1686 | 0.4101 | 0.8629 |
|
| 55 |
-
| 0.1243 | 3.0 | 2529 | 0.6089 | 0.8531 |
|
| 56 |
-
| 0.0747 | 4.0 | 3372 | 0.6828 | 0.8588 |
|
| 57 |
-
| 0.0479 | 5.0 | 4215 | 0.7639 | 0.8540 |
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
### Framework versions
|
| 61 |
-
|
| 62 |
-
- Transformers 4.52.2
|
| 63 |
-
- Pytorch 2.6.0+cu124
|
| 64 |
-
- Datasets 2.14.4
|
| 65 |
-
- Tokenizers 0.21.1
|
|
|
|
| 1 |
+
Example use:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
+
from transformers import pipeline
|
| 4 |
+
text = "This was a masterpiece. Not completely faithful to the books, but enthralling from beginning to end. Might be my favorite of the three."
|
| 5 |
|
|
|
|
| 6 |
|
| 7 |
+
classifier = pipeline("sentiment-analysis", model="ekurtulus/cyberbullying_classifier")
|
| 8 |
+
classifier(text)
|
|
|
|
|
|
|
| 9 |
|
| 10 |
+
# label=0 not bullying, label=1 bullying
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|