Commit ·
0778dbe
1
Parent(s): e5540a2
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,22 +1,15 @@
|
|
| 1 |
---
|
| 2 |
tags:
|
| 3 |
-
- autotrain
|
| 4 |
- text-classification
|
|
|
|
| 5 |
language:
|
| 6 |
- en
|
| 7 |
widget:
|
| 8 |
-
- text: "I love
|
| 9 |
datasets:
|
| 10 |
-
- madmancity/
|
| 11 |
-
co2_eq_emissions:
|
| 12 |
-
emissions: 0.8759779776754995
|
| 13 |
---
|
| 14 |
|
| 15 |
-
# Model Trained Using AutoTrain
|
| 16 |
-
|
| 17 |
-
- Problem type: Multi-class Classification
|
| 18 |
-
- Model ID: 48079117239
|
| 19 |
-
- CO2 Emissions (in grams): 0.8760
|
| 20 |
|
| 21 |
## Validation Metrics
|
| 22 |
|
|
@@ -38,7 +31,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": "I love
|
| 42 |
```
|
| 43 |
|
| 44 |
Or Python API:
|
|
@@ -46,11 +39,11 @@ Or Python API:
|
|
| 46 |
```
|
| 47 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 48 |
|
| 49 |
-
model = AutoModelForSequenceClassification.from_pretrained("madmancity/
|
| 50 |
|
| 51 |
-
tokenizer = AutoTokenizer.from_pretrained("madmancity/
|
| 52 |
|
| 53 |
-
inputs = tokenizer("I love
|
| 54 |
|
| 55 |
outputs = model(**inputs)
|
| 56 |
```
|
|
|
|
| 1 |
---
|
| 2 |
tags:
|
|
|
|
| 3 |
- text-classification
|
| 4 |
+
- sentiment-analysis
|
| 5 |
language:
|
| 6 |
- en
|
| 7 |
widget:
|
| 8 |
+
- text: "I love this product! One of my best purchases this year."
|
| 9 |
datasets:
|
| 10 |
+
- madmancity/revmlc
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
## Validation Metrics
|
| 15 |
|
|
|
|
| 31 |
You can use cURL to access this model:
|
| 32 |
|
| 33 |
```
|
| 34 |
+
$ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "I love this product! One of my best purchases this year."}' https://api-inference.huggingface.co/models/madmancity/revmlc
|
| 35 |
```
|
| 36 |
|
| 37 |
Or Python API:
|
|
|
|
| 39 |
```
|
| 40 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
| 41 |
|
| 42 |
+
model = AutoModelForSequenceClassification.from_pretrained("madmancity/revmlc", use_auth_token=True)
|
| 43 |
|
| 44 |
+
tokenizer = AutoTokenizer.from_pretrained("madmancity/revmlc", use_auth_token=True)
|
| 45 |
|
| 46 |
+
inputs = tokenizer("I love this product! One of my best purchases this year.", return_tensors="pt")
|
| 47 |
|
| 48 |
outputs = model(**inputs)
|
| 49 |
```
|