pt-sk commited on
Commit
08bf7ad
1 Parent(s): 13bad77

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +33 -33
README.md CHANGED
@@ -1,34 +1,34 @@
1
- ---
2
- license: afl-3.0
3
- language:
4
- - en
5
- metrics:
6
- - accuracy
7
- library_name: transformers
8
- pipeline_tag: text-classification
9
- ---
10
-
11
- ## Model description
12
- This model is a fine-tuned version of the [bert-base-uncased](https://huggingface.co/transformers/model_doc/bert.html) model to classify toxic comments.
13
-
14
- ## How to use
15
-
16
- You can use the model with the following code.
17
-
18
- ```python
19
- from transformers import BertForSequenceClassification, BertTokenizer, TextClassificationPipeline
20
-
21
- model_path = "pt-sk/bert-toxic-classification"
22
- tokenizer = BertTokenizer.from_pretrained(model_path)
23
- model = BertForSequenceClassification.from_pretrained(model_path, num_labels=2)
24
-
25
- pipeline = TextClassificationPipeline(model=model, tokenizer=tokenizer)
26
- print(pipeline("You're a fucking nerd."))
27
- ```
28
-
29
- ## Training data
30
- The training data comes from this [Kaggle competition](https://www.kaggle.com/c/jigsaw-unintended-bias-in-toxicity-classification/data). We use 90% of the `train.csv` data to train the model.
31
-
32
- ## Evaluation results
33
-
34
  The model achieves 0.95 AUC in a 1500 rows held-out test set.
 
1
+ ---
2
+ license: afl-3.0
3
+ language:
4
+ - en
5
+ metrics:
6
+ - accuracy
7
+ library_name: transformers
8
+ pipeline_tag: text-classification
9
+ ---
10
+
11
+ ## Model description
12
+ This model is a fine-tuned version of the [bert-base-uncased](https://huggingface.co/transformers/model_doc/bert.html) model to classify toxic comments.
13
+
14
+ ## How to use
15
+
16
+ You can use the model with the following code.
17
+
18
+ ```python
19
+ from transformers import BertForSequenceClassification, BertTokenizer, TextClassificationPipeline
20
+
21
+ model_path = "Kwaai/bert-toxic-classification"
22
+ tokenizer = BertTokenizer.from_pretrained(model_path)
23
+ model = BertForSequenceClassification.from_pretrained(model_path, num_labels=2)
24
+
25
+ pipeline = TextClassificationPipeline(model=model, tokenizer=tokenizer)
26
+ print(pipeline("You're a fucking nerd."))
27
+ ```
28
+
29
+ ## Training data
30
+ The training data comes from this [Kaggle competition](https://www.kaggle.com/c/jigsaw-unintended-bias-in-toxicity-classification/data). We use 90% of the `train.csv` data to train the model.
31
+
32
+ ## Evaluation results
33
+
34
  The model achieves 0.95 AUC in a 1500 rows held-out test set.