--- license: apache-2.0 tags: - bert - kcbert - kor-hate-sentence - sentimental-analysis --- # SJ-Donald/kor-hate-sentence SJ-Donald/kor-hate-sentence is pretrained model using follow: ## Models * [beomi/kcbert-large](https://huggingface.co/beomi/kcbert-large) ## Datasets * [SJ-Donald/kor-hate-sentence](https://huggingface.co/datasets/SJ-Donald/kor-hate-sentence) ## How to use ```Python 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.7051385641098022} {'label': 'clean', 'score': 0.29405009746551514} ```