mizanur65 commited on
Commit
f16e0df
1 Parent(s): d5fe84d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -1
README.md CHANGED
@@ -34,7 +34,8 @@ from transformers import AutoTokenizer, AutoModelForSequenceClassification
34
  tokenizer = AutoTokenizer.from_pretrained("newsmediabias/UnBIAS-classification-bert")
35
  model = AutoModelForSequenceClassification.from_pretrained("newsmediabias/UnBIAS-classification-bert")
36
 
37
- pipe = pipeline("text-classification", model="newsmediabias/UnBIAS-classification-bert")
 
38
 
39
  classifier("Anyone can excel at coding.")
40
  ```
 
34
  tokenizer = AutoTokenizer.from_pretrained("newsmediabias/UnBIAS-classification-bert")
35
  model = AutoModelForSequenceClassification.from_pretrained("newsmediabias/UnBIAS-classification-bert")
36
 
37
+ classifier = pipeline("text-classification", model=model, tokenizer=tokenizer , device=0 if device.type == "cuda" else -1)
38
+
39
 
40
  classifier("Anyone can excel at coding.")
41
  ```