Deepak Tiwari commited on
Commit ·
53f6e7a
1
Parent(s): b2855c1
first commit
Browse files
README.md
CHANGED
|
@@ -34,7 +34,7 @@ co2_eq_emissions: 2.0318857468309206
|
|
| 34 |
You can use cURL to access this model:
|
| 35 |
|
| 36 |
```
|
| 37 |
-
$ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "I love AutoNLP"}' https://api-inference.huggingface.co/models/
|
| 38 |
```
|
| 39 |
|
| 40 |
Or Python API:
|
|
@@ -42,9 +42,9 @@ Or Python API:
|
|
| 42 |
```
|
| 43 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 44 |
|
| 45 |
-
model = AutoModelForSequenceClassification.from_pretrained("
|
| 46 |
|
| 47 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
| 48 |
|
| 49 |
inputs = tokenizer("I love AutoNLP", return_tensors="pt")
|
| 50 |
|
|
|
|
| 34 |
You can use cURL to access this model:
|
| 35 |
|
| 36 |
```
|
| 37 |
+
$ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "I love AutoNLP"}' https://api-inference.huggingface.co/models/rayschwartz/new-text-classifications
|
| 38 |
```
|
| 39 |
|
| 40 |
Or Python API:
|
|
|
|
| 42 |
```
|
| 43 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 44 |
|
| 45 |
+
model = AutoModelForSequenceClassification.from_pretrained("rayschwartz/new-text-classifications", use_auth_token=True)
|
| 46 |
|
| 47 |
+
tokenizer = AutoTokenizer.from_pretrained("rayschwartz/new-text-classifications", use_auth_token=True)
|
| 48 |
|
| 49 |
inputs = tokenizer("I love AutoNLP", return_tensors="pt")
|
| 50 |
|