Update README.md
Browse files
README.md
CHANGED
|
@@ -5,7 +5,7 @@ tags:
|
|
| 5 |
language:
|
| 6 |
- fr
|
| 7 |
widget:
|
| 8 |
-
- text: "Je
|
| 9 |
datasets:
|
| 10 |
- jeveuxaider/activity-classifier
|
| 11 |
co2_eq_emissions:
|
|
@@ -38,7 +38,7 @@ 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": "Je
|
| 42 |
```
|
| 43 |
|
| 44 |
Or Python API:
|
|
@@ -47,6 +47,6 @@ Or Python API:
|
|
| 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
|
| 51 |
outputs = model(**inputs)
|
| 52 |
```
|
|
|
|
| 5 |
language:
|
| 6 |
- fr
|
| 7 |
widget:
|
| 8 |
+
- text: "Je participe à un accueil de jour"
|
| 9 |
datasets:
|
| 10 |
- jeveuxaider/activity-classifier
|
| 11 |
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": "Je participe à un accueil de jour"}' https://api-inference.huggingface.co/models/jeveuxaider/activity-classifier
|
| 42 |
```
|
| 43 |
|
| 44 |
Or Python API:
|
|
|
|
| 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 participe à un accueil de jour", return_tensors="pt")
|
| 51 |
outputs = model(**inputs)
|
| 52 |
```
|