Downloads · 30 days
6
10% of all-time downloads
nuguri01/pgos-emotion-stage1-major
pgos-emotion-stage1-major is a machine learning model from nuguri01. 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.
Psychological Growth OS(PGOS) 프로젝트의 감정 분류 모델입니다. 계층적 2단계 분류기의 1단계 대분류 모델입니다.
Downloads · 30 days
6
10% of all-time downloads
All-time downloads
63
Public
Parameters
128M
1.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt1 GB · 50%
From the Hugging Face model README
Psychological Growth OS(PGOS) 프로젝트의 감정 분류 모델입니다. 계층적 2단계 분류기의 1단계 대분류 모델입니다.
입력 텍스트를 6개 감정 대분류로 분류합니다.
| 클래스 | 포함 감정 |
|---|---|
| 분노계 | 분노, 좌절, 짜증 |
| 슬픔계 | 슬픔, 우울, 후회 |
| 불안계 | 불안, 걱정 |
| 상처계 | 상처, 억울, 질투 |
| 당황계 | 수치심, 죄책감, 당황 |
| 기쁨계 | 기쁨, 안도 |
| 지표 | 값 |
|---|---|
| Macro F1 | 0.692 |
| Accuracy | 0.684 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
tokenizer = AutoTokenizer.from_pretrained("nuguri01/pgos-emotion-stage1-major")
model = AutoModelForSequenceClassification.from_pretrained("nuguri01/pgos-emotion-stage1-major")
text = "오늘 너무 화가 나고 짜증이 밀려와요"
inputs = tokenizer(text, return_tensors="pt", max_length=128, truncation=True)
with torch.no_grad():
logits = model(**inputs).logits
pred = torch.argmax(logits, dim=-1).item()
labels = ["분노계", "슬픔계", "불안계", "상처계", "당황계", "기쁨계"]
print(f"대분류: {labels[pred]}")
입력 텍스트 ↓ Stage 1 (이 모델) → 대분류 예측 ↓ Stage 2 (소분류 모델) → 세부 감정 예측 ↓ Top-3 감정 반환 (Hit Rate 0.877)