Downloads · 30 days
9
24% of all-time downloads
rfahlevih/fine-tuned-cahya-distilbert-base-indonesia-reviews
fine-tuned-cahya-distilbert-base-indonesia-reviews is a machine learning model from rfahlevih. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
This model is fine-tuned model version of the [Distilbert base Indonesian] (https://huggingface.co/cahya/distilbert-base-indonesian)
Downloads · 30 days
9
24% of all-time downloads
All-time downloads
37
Public
Parameters
68.1M
272 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors272 MB · 100%
From the Hugging Face model README
This model is fine-tuned model version of the [Distilbert base Indonesian] (https://huggingface.co/cahya/distilbert-base-indonesian)
This model is trained from a dataset of 10,000 review data on Tokopedia and Shopee on Google Playstore in Indonesian.
You can use this model with the following steps:
>>> from transformers import AutoModelForSequenceClassification, AutoTokenizer
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model_name='rfahlevih/fine-tuned-cahya-distilbert-base-indonesia-reviews'
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
text = "Isi dengan sentimen apa saja."
inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)
outputs = model(**inputs)
logits = outputs.logits
predicted_class = logits.argmax(dim=-1).item()
sentiment = "Negative" if predicted_class == 0 else "Positive"
print(f"Predicted class: {predicted_class}\nSentimen: {sentiment}")