Downloads · 30 days
7
1% of all-time downloads
fathurfrs/indonesia-distilledbert-sentiment-classification
indonesia-distilledbert-sentiment-classification is a text classification model from fathurfrs. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
This model is a fine-tuned version of DistilledBERT for sentiment classification in Indonesian language. It's designed to analyze and categorize the sentiment of Indonesian text into positive, negative, or neutral cat…
Downloads · 30 days
7
1% of all-time downloads
All-time downloads
910
Public
Parameters
67M
804 MB on disk
Likes
1
Public
Click a slice to open those files.
.pt536 MB · 67%
From the Hugging Face model README
This model is a fine-tuned version of DistilledBERT for sentiment classification in Indonesian language. It's designed to analyze and categorize the sentiment of Indonesian text into positive, negative, or neutral categories.
You can use this model directly with the Hugging Face transformers library:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
from transformers import pipeline
pretrained= "fathurfrs/indonesia-distilledbert-sentiment-classification"
model = AutoModelForSequenceClassification.from_pretrained(pretrained)
tokenizer = AutoTokenizer.from_pretrained("distilbert/distilbert-base-uncased")
sentiment_analysis = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
label2id = {"LABEL_0": "negative", "LABEL_1": "neutral", "LABEL_2": "positive"}
text = "Saya sangat senang dengan pelayanan di restoran ini."
sentiment = label2id[sentiment_analysis(text)[0]['label']]
score = sentiment_analysis(text)[0]['score']
print(sentiment, score)
This model was fine-tuned on a dataset of Indonesian tweets covering various topics such as politics, freedom of speech, Indonesian culture, and more. The dataset includes a balanced distribution of positive, negative, and neutral sentiments.
The model achieves the following performance on our test set:
This model is intended for sentiment analysis of public texts. Users should be aware of potential biases in the training data and use the model responsibly, especially in sensitive applications.