A fine-tuned BERT-based model for detecting toxic and offensive text, with a focus on Hebrew social media comments.
This model was developed as part of my final Computer Science project.
The goal is to improve automatic detection of harmful, offensive, and toxic comments, especially in Hebrew, where existing toxicity models often perform less accurately.
The model is based on a Transformer text-classification architecture and was fine-tuned on a custom dataset of toxic and non-toxic examples.
This model is used as part of a browser extension that helps reduce direct exposure to harmful comments by blurring content detected as toxic.
1from transformers import pipeline
2
3model_path = "maayan3330/hebrew-toxicity-detector"
4
5classifier = pipeline(
6 "text-classification",
7 model=model_path,
8 tokenizer=model_path
9)
10
11result = classifier("אתה פשוט מגעיל")
12print(result)