JungleLee commited on
Commit
e8e72c7
1 Parent(s): bac46c7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -18,11 +18,11 @@ This model is a fine-tuned version of the [bert-base-uncased](https://huggingfac
18
  You can use the model with the following code.
19
 
20
  ```python
21
- from transformers import AutoModelForSequenceClassification, AutoTokenizer, TextClassificationPipeline
22
 
23
  model_path = "JungleLee/bert-toxic-comment-classification"
24
- tokenizer = AutoTokenizer.from_pretrained(model_path)
25
- model = AutoModelForSequenceClassification.from_pretrained(model_path)
26
 
27
  pipeline = TextClassificationPipeline(model=model, tokenizer=tokenizer)
28
  print(pipeline("You're a fucking nerd."))
 
18
  You can use the model with the following code.
19
 
20
  ```python
21
+ from transformers import BertForSequenceClassification, BertTokenizer, TextClassificationPipeline
22
 
23
  model_path = "JungleLee/bert-toxic-comment-classification"
24
+ tokenizer = BertTokenizer.from_pretrained(model_path)
25
+ model = BertForSequenceClassification.from_pretrained(model_path, num_labels=2)
26
 
27
  pipeline = TextClassificationPipeline(model=model, tokenizer=tokenizer)
28
  print(pipeline("You're a fucking nerd."))