SJ-Donald's picture
Upload folder using huggingface_hub
fa0cbc8 verified
metadata
license: apache-2.0
tags:
  - bert
  - kcbert
  - unsmile

SJ-Donald/kcbert-large-unsmile

SJ-Donald/kcbert-large-unsmile is pretrained model using follow:

Models

Datasets

How to use

from transformers import TextClassificationPipeline, BertForSequenceClassification, AutoTokenizer+

model_name = 'SJ-Donald/kcbert-large-unsmile'
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': 'μ—¬μ„±/κ°€μ‘±', 'score': 0.9793611168861389}
{'label': '남성', 'score': 0.006330598145723343}
{'label': 'μ„±μ†Œμˆ˜μž', 'score': 0.007870828732848167}
{'label': '인쒅/ꡭ적', 'score': 0.010810344479978085}
{'label': 'μ—°λ Ή', 'score': 0.020540334284305573}
{'label': '지역', 'score': 0.015790466219186783}
{'label': '쒅ꡐ', 'score': 0.014563685283064842}
{'label': '기타 혐였', 'score': 0.04097242280840874}
{'label': 'μ•…ν”Œ/μš•μ„€', 'score': 0.019168635830283165}
{'label': 'clean', 'score': 0.014866289682686329}