|
|
--- |
|
|
tags: |
|
|
- autotrain |
|
|
- text-classification |
|
|
language: |
|
|
- en |
|
|
widget: |
|
|
- text: "I love AutoTrain 🤗" |
|
|
datasets: |
|
|
- ashwinperti/autotrain-data-ashwin_sentiment140dataset |
|
|
co2_eq_emissions: |
|
|
emissions: 1.3744604633696438 |
|
|
--- |
|
|
|
|
|
# Model Trained Using AutoTrain |
|
|
|
|
|
- Problem type: Multi-class Classification |
|
|
- Model ID: 1625557371 |
|
|
- CO2 Emissions (in grams): 1.3745 |
|
|
|
|
|
## Validation Metrics |
|
|
|
|
|
- Loss: 0.411 |
|
|
- Accuracy: 0.817 |
|
|
- Macro F1: 0.817 |
|
|
- Micro F1: 0.817 |
|
|
- Weighted F1: 0.817 |
|
|
- Macro Precision: 0.818 |
|
|
- Micro Precision: 0.817 |
|
|
- Weighted Precision: 0.818 |
|
|
- Macro Recall: 0.817 |
|
|
- Micro Recall: 0.817 |
|
|
- Weighted Recall: 0.817 |
|
|
|
|
|
|
|
|
## Usage |
|
|
|
|
|
You can use cURL to access this model: |
|
|
|
|
|
``` |
|
|
$ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "I love AutoTrain"}' https://api-inference.huggingface.co/models/ashwinperti/autotrain-ashwin_sentiment140dataset-1625557371 |
|
|
``` |
|
|
|
|
|
Or Python API: |
|
|
|
|
|
``` |
|
|
from transformers import AutoModelForSequenceClassification, AutoTokenizer |
|
|
|
|
|
model = AutoModelForSequenceClassification.from_pretrained("ashwinperti/autotrain-ashwin_sentiment140dataset-1625557371", use_auth_token=True) |
|
|
|
|
|
tokenizer = AutoTokenizer.from_pretrained("ashwinperti/autotrain-ashwin_sentiment140dataset-1625557371", use_auth_token=True) |
|
|
|
|
|
inputs = tokenizer("I love AutoTrain", return_tensors="pt") |
|
|
|
|
|
outputs = model(**inputs) |
|
|
``` |