Update README.md
Browse files
README.md
CHANGED
|
@@ -43,6 +43,29 @@ The following hyperparameters were used during training:
|
|
| 43 |
- lr_scheduler_type: linear
|
| 44 |
- num_epochs: 10
|
| 45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
### Training results
|
| 47 |
|
| 48 |
|
|
|
|
| 43 |
- lr_scheduler_type: linear
|
| 44 |
- num_epochs: 10
|
| 45 |
|
| 46 |
+
|
| 47 |
+
## Usage
|
| 48 |
+
|
| 49 |
+
You can use cURL to access this model:
|
| 50 |
+
|
| 51 |
+
```
|
| 52 |
+
$ 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/jarvisx17/japanese-sentiment-analysis
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
Or Python API:
|
| 56 |
+
|
| 57 |
+
```
|
| 58 |
+
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 59 |
+
|
| 60 |
+
model = AutoModelForSequenceClassification.from_pretrained("jarvisx17/japanese-sentiment-analysis", use_auth_token=True)
|
| 61 |
+
|
| 62 |
+
tokenizer = AutoTokenizer.from_pretrained("jarvisx17/japanese-sentiment-analysis", use_auth_token=True)
|
| 63 |
+
|
| 64 |
+
inputs = tokenizer("I love AutoNLP", return_tensors="pt")
|
| 65 |
+
|
| 66 |
+
outputs = model(**inputs)
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
### Training results
|
| 70 |
|
| 71 |
|