DarwinAnim8or
commited on
Commit
•
2cc0397
1
Parent(s):
5cf9217
Update README.md
Browse files
README.md
CHANGED
@@ -64,7 +64,7 @@ Users should carefully consider the purpose, context, and impact of using this m
|
|
64 |
You can use cURL to access this model:
|
65 |
|
66 |
```
|
67 |
-
$ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "I love AutoTrain"}' https://api-inference.huggingface.co/models/
|
68 |
```
|
69 |
|
70 |
Or Python API:
|
@@ -72,9 +72,9 @@ Or Python API:
|
|
72 |
```
|
73 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
74 |
|
75 |
-
model = AutoModelForSequenceClassification.from_pretrained("
|
76 |
|
77 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
78 |
|
79 |
inputs = tokenizer("I love AutoTrain", return_tensors="pt")
|
80 |
|
|
|
64 |
You can use cURL to access this model:
|
65 |
|
66 |
```
|
67 |
+
$ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "I love AutoTrain"}' https://api-inference.huggingface.co/models/KoalaAI/OffensiveSpeechDetector
|
68 |
```
|
69 |
|
70 |
Or Python API:
|
|
|
72 |
```
|
73 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
74 |
|
75 |
+
model = AutoModelForSequenceClassification.from_pretrained("KoalaAI/OffensiveSpeechDetector", use_auth_token=True)
|
76 |
|
77 |
+
tokenizer = AutoTokenizer.from_pretrained("KoalaAI/OffensiveSpeechDetector", use_auth_token=True)
|
78 |
|
79 |
inputs = tokenizer("I love AutoTrain", return_tensors="pt")
|
80 |
|