Text Classification
Transformers
PyTorch
Enawené-Nawé
bert
Trained with AutoTrain
text-embeddings-inference
Instructions to use dafex/indobert-sentiment-analysis with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dafex/indobert-sentiment-analysis with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="dafex/indobert-sentiment-analysis")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("dafex/indobert-sentiment-analysis") model = AutoModelForSequenceClassification.from_pretrained("dafex/indobert-sentiment-analysis") - Notebooks
- Google Colab
- Kaggle
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("dafex/indobert-sentiment-analysis")
model = AutoModelForSequenceClassification.from_pretrained("dafex/indobert-sentiment-analysis")Quick Links
Model Trained Using AutoTrain
- Problem type: Binary Classification
- Model ID: 2713480683
- CO2 Emissions (in grams): 1.3428
Validation Metrics
- Loss: 0.132
- Accuracy: 0.960
- Precision: 0.966
- Recall: 0.973
- AUC: 0.993
- F1: 0.969
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/dafex/autotrain-indobert-sentiment-analysis-2713480683
Or Python API:
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model = AutoModelForSequenceClassification.from_pretrained("dafex/autotrain-indobert-sentiment-analysis-2713480683", use_auth_token=True)
tokenizer = AutoTokenizer.from_pretrained("dafex/autotrain-indobert-sentiment-analysis-2713480683", use_auth_token=True)
inputs = tokenizer("I love AutoTrain", return_tensors="pt")
outputs = model(**inputs)
- Downloads last month
- 10
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="dafex/indobert-sentiment-analysis")