Downloads · 30 days
31
10% of all-time downloads
kairaamilanii/IndoBERT-Bullying-Classifier
IndoBERT-Bullying-Classifier is a text classification model from kairaamilanii. Use it when you need a label for a piece of text. The card lists the license as cc0-1.0.
This model is based on a BERT model trained with a few bullying detection datasets. It is trained exclusively in the Indonesian language.
Downloads · 30 days
31
10% of all-time downloads
All-time downloads
325
Public
Parameters
111M
442 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors442 MB · 100%
From the Hugging Face model README
This model is based on a BERT model trained with a few bullying detection datasets. It is trained exclusively in the Indonesian language.
from transformers import BertTokenizer, AutoModelForSequenceClassification
model_path = 'kairaamilanii/IndoBERT-Bullying-Classifier'
tokenizer = BertTokenizer.from_pretrained(model_path)
model = AutoModelForSequenceClassification.from_pretrained(model_path)
text = "KOK JELEK BANGET SIH" # Example text for prediction
inputs = tokenizer(text, return_tensors="pt")
with torch.no_grad():
outputs = model(**inputs)
predicted_class = torch.argmax(outputs.logits, dim=-1).item()
print(f"Predicted class: {predicted_class}")
if predicted_class == 1:
print("Prediction: Bullying")
else:
print("Prediction: Non-bullying")
example output:
[{'Predicted class': 1, 'Prediction': Bullying}]