Downloads · 30 days
11
26% of all-time downloads
YMmim/klue-bert-emotion-6
klue-bert-emotion-6 is a text classification model from YMmim. Use it when you need a label for a piece of text. The card lists the license as cc-by-nc-4.0.
klue/bert-base를 AI Hub「공감형 대화」데이터로 미세조정한 한국어 감정 분류 모델입니다.
Downloads · 30 days
11
26% of all-time downloads
All-time downloads
43
Public
Parameters
111M
443 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors443 MB · 100%
From the Hugging Face model README
klue/bert-base를 AI Hub「공감형 대화」데이터로 미세조정한 한국어 감정 분류 모델입니다.
| id | 감정 |
|---|---|
| 0 | 기쁨 |
| 1 | 슬픔 |
| 2 | 분노 |
| 3 | 불안 |
| 4 | 당황 |
| 5 | 상처 |
klue/bert-baseimport torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
REPO = "YMmim/klue-bert-emotion-6"
labels = ["기쁨", "슬픔", "분노", "불안", "당황", "상처"]
tok = AutoTokenizer.from_pretrained(REPO)
model = AutoModelForSequenceClassification.from_pretrained(REPO)
model.eval()
x = tok("시험 결과가 걱정돼서 잠이 안 와.", return_tensors="pt", truncation=True, max_length=128)
with torch.no_grad():
print(labels[int(model(**x).logits.argmax())])
감정 라벨이 발화 단위가 아니라 대화 단위로 부여된 데이터 특성상, 한 대화 내 모든 화자 발화에 동일 감정이 적용되어 성능 상한에 제약이 있습니다.
AI Hub 「공감형 대화」 데이터셋 기반. 비상업적 용도로 사용하세요.