Downloads · 30 days
9
10% of all-time downloads
SJ-Donald/kor-hate-sentence
kor-hate-sentence is a text classification model from SJ-Donald. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
SJ-Donald/kor-hate-sentence is pretrained model using follow:
Downloads · 30 days
9
10% of all-time downloads
All-time downloads
93
Public
Parameters
109M
871 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors436 MB · 100%
From the Hugging Face model README
SJ-Donald/kor-hate-sentence is pretrained model using follow:
from transformers import TextClassificationPipeline, BertForSequenceClassification, AutoTokenizer+
model_name = 'SJ-Donald/kor-hate-sentence'
model = BertForSequenceClassification.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
pipe = TextClassificationPipeline(
model = model,
tokenizer = tokenizer,
device = 0, # cpu: -1, gpu: gpu number
return_all_scores = True,
function_to_apply = 'sigmoid'
)
for result in pipe("그렇게 게임하면 어떡하냐 방송 접어라 허접아")[0]:
print(result)
{'label': 'hate', 'score': 0.9767946600914001}
{'label': 'clean', 'score': 0.023970650508999825}