File size: 1,214 Bytes
96127dc 074a430 96a6dd6 96127dc 074a430 96127dc 074a430 96127dc 074a430 bcfa65d fede59a 074a430 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
---
license: mit
base_model:
- cahya/distilbert-base-indonesian
language:
- id
---
# Fine-Tuned DistilBERT Indonesia base model
## Model Description
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.
## Intended uses & limitations
### How to use
You can use this model with the following steps:
```python
>>> 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}")
``` |