SJ-Donald/kor-hate-sentence
SJ-Donald/kor-hate-sentence is pretrained model using follow:
Models
Datasets
How to use
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}
- Downloads last month
- 5
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.