Update README.md
Browse files
README.md
CHANGED
|
@@ -5,9 +5,9 @@ tags:
|
|
| 5 |
language:
|
| 6 |
- fr
|
| 7 |
widget:
|
| 8 |
-
- text: "
|
| 9 |
datasets:
|
| 10 |
-
-
|
| 11 |
co2_eq_emissions:
|
| 12 |
emissions: 12.734050517307358
|
| 13 |
---
|
|
@@ -38,19 +38,15 @@ co2_eq_emissions:
|
|
| 38 |
You can use cURL to access this model:
|
| 39 |
|
| 40 |
```
|
| 41 |
-
$ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "
|
| 42 |
```
|
| 43 |
|
| 44 |
Or Python API:
|
| 45 |
|
| 46 |
```
|
| 47 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
tokenizer = AutoTokenizer.from_pretrained("huynhdoo/autotrain-jva-activity-classification-2096367492", use_auth_token=True)
|
| 52 |
-
|
| 53 |
-
inputs = tokenizer("I love AutoTrain", return_tensors="pt")
|
| 54 |
-
|
| 55 |
outputs = model(**inputs)
|
| 56 |
```
|
|
|
|
| 5 |
language:
|
| 6 |
- fr
|
| 7 |
widget:
|
| 8 |
+
- text: "Je m'occupe d'un accueil de jour"
|
| 9 |
datasets:
|
| 10 |
+
- jeveuxaider/activity-classifier
|
| 11 |
co2_eq_emissions:
|
| 12 |
emissions: 12.734050517307358
|
| 13 |
---
|
|
|
|
| 38 |
You can use cURL to access this model:
|
| 39 |
|
| 40 |
```
|
| 41 |
+
$ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "Je m'occupe d'un accueil de jour"}' https://api-inference.huggingface.co/models/huynhdoo/autotrain-jva-activity-classification-2096367492
|
| 42 |
```
|
| 43 |
|
| 44 |
Or Python API:
|
| 45 |
|
| 46 |
```
|
| 47 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 48 |
+
model = AutoModelForSequenceClassification.from_pretrained("jeveuxaider/activity-classifier", use_auth_token=True)
|
| 49 |
+
tokenizer = AutoTokenizer.from_pretrained("jeveuxaider/activity-classifier", use_auth_token=True)
|
| 50 |
+
inputs = tokenizer("Je m'occupe d'un accueil de jour", return_tensors="pt")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
outputs = model(**inputs)
|
| 52 |
```
|