Downloads · 30 days
7
39% of all-time downloads
MAwaisM/results
results is a text classification model from MAwaisM. 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 xlm-roberta-base for the task of sentiment analysis on Indonesian e-commerce product reviews.
Downloads · 30 days
7
39% of all-time downloads
All-time downloads
18
Public
Parameters
278M
1.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.1 GB · 98%
From the Hugging Face model README
This model is a fine-tuned version of xlm-roberta-base for the task of sentiment analysis on Indonesian e-commerce product reviews.
The model was trained on the dipawidia/ecommerce-product-reviews-sentiment dataset, which consists of product reviews. The model classifies reviews into two categories: POSITIVE and NEGATIVE.
This model is intended for sentiment analysis of product reviews in the Indonesian language. It is a good starting point for a Business Analyst to understand customer feedback at scale. The primary limitation is that it was trained for only one epoch, so while its performance is high, it may not be as robust as a model trained for multiple epochs.
The model was fine-tuned using the dipawidia/ecommerce-product-reviews-sentiment dataset. The dataset's review column was used as the input, and the sentimen column was used as the label. The sentimen column was mapped to 0 for negative reviews and 1 for positive reviews.
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 0.3998 | 1.0 | 1306 | 0.2992 | 0.9173 |
You can use this model directly with the Hugging Face pipeline function.
from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline
# Define the label mapping
label_map = {0: "NEGATIVE", 1: "POSITIVE"}
# Load the model directly from your profile
model = AutoModelForSequenceClassification.from_pretrained(
"MAwaisM/results",
num_labels=2,
id2label=label_map
)
# Load the tokenizer
tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-base")
# Create the pipeline
classifier = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
# Test with a positive Indonesian review
text = "Pengiriman sangat cepat, saya sangat senang dengan produknya."
print(classifier(text))
# Test with a negative Indonesian review
text = "Pelayanan pelanggan sangat buruk, saya tidak akan membeli lagi."
print(classifier(text))