Downloads · 30 days
18
15% of all-time downloads
sihyeonmoon/moodtown-emotion-model
moodtown-emotion-model is a machine learning model from sihyeonmoon. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
한국어 감정 분류를 위한 KLUE-RoBERTa-base 기반 모델입니다.
Downloads · 30 days
18
15% of all-time downloads
All-time downloads
117
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-RoBERTa-base 기반 모델입니다.
이 모델은 KLUE-RoBERTa-base를 기반으로 하여 한국어 텍스트의 감정을 5가지 카테고리로 분류합니다.
moodtown 프로젝트의 일부로 개발되었으며, AI Hub 감성 대화 말뭉치를 사용하여 학습되었습니다.
모델은 다음 5가지 감정을 분류합니다.
klue/roberta-baseRobertaForSequenceClassificationAI Hub 원본 라벨을 5개 감정으로 매핑.
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# 모델 및 토크나이저 로드
model_name = "sihyeonmoon/moodtown-emotion-model"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
# 텍스트 분류
text = "오늘 정말 기분이 좋아요"
inputs = tokenizer(
text,
return_tensors="pt",
max_length=128,
truncation=True,
padding=True,
)
with torch.no_grad():
outputs = model(**inputs)
predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
labels = ["기쁨", "당황", "분노", "불안", "슬픔"]
predicted_label = labels[predictions.argmax().item()]
confidence = predictions.max().item()
print(f"예측 감정: {predicted_label} (신뢰도: {confidence:.2%})")
### Pipeline 사용
```python
from transformers import pipeline
classifier = pipeline(
"text-classification",
model="your-username/moodtown-emotion-classifier",
tokenizer="your-username/moodtown-emotion-classifier",
return_all_scores=True,
)
result = classifier("오늘 하루가 힘들었어요.")
print(result)
MIT License
@misc{moodtown-emotion-model,
title={moodtown-emotion-model: Korean Emotion Classification Model},
author={Moon sihyeon},
year={2025},
publisher={Hugging Face},
howpublished={\url{https://huggingface.co/sihyeonmoon/moodtown-emotion-model}}
}