Downloads · 30 days
138
4% of all-time downloads
tsdocode/phobert-finetune-hatespeech
phobert-finetune-hatespeech is a text classification model from tsdocode. Use it when you need a label for a piece of text. It is set up for transformers.
- VLSP2019: Hate Speech Detection on Social Networks Dataset - ViHSD: Vietnamese Hate Speech Detection dataset
Downloads · 30 days
138
4% of all-time downloads
All-time downloads
3.2K
Public
Repo size
1.1 GB
Likes
2
Public
Click a slice to open those files.
.bin540 MB · 100%
From the Hugging Face model README
from transformers import AutoModelForSequenceClassification, AutoTokenizer, TextClassificationPipeline
model = AutoModelForSequenceClassification.from_pretrained("tsdocode/phobert-finetune-hatespeech", num_labels=3)
tokenizer = AutoTokenizer.from_pretrained("tsdocode/phobert-finetune-hatespeech")
pipe = TextClassificationPipeline(model=model, tokenizer=tokenizer, return_all_scores=True)
# outputs a list of dicts like [[{'label': 'NEGATIVE', 'score': 0.0001223755971295759}, {'label': 'POSITIVE', 'score': 0.9998776316642761}]]
pipe("đồ ngu")