File size: 2,090 Bytes
0acede6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
---
language: ko
license: mit
library_name: transformers
tags:
- text-classification
- korean
- mental-health
- depression-detection
- bert
pipeline_tag: text-classification
---
# Korean Depression/Anxiety Detection Model
ํ๊ตญ์ด ํ
์คํธ ๊ธฐ๋ฐ ์ฐ์ธ/๋ถ์ ๊ฐ์ง ๋ชจ๋ธ์
๋๋ค.
## Model Description
- **Model Type:** BERT for Sequence Classification
- **Language:** Korean (ko)
- **Task:** Binary Classification (์ ์ vs ์ฐ์ธ/๋ถ์)
- **Base Model:** BERT (Korean)
## Labels
| Label | Description |
|-------|-------------|
| 0 | ์ ์ (Normal) |
| 1 | ์ฐ์ธ/๋ถ์ (Depression/Anxiety) |
## Usage
```python
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
# ๋ชจ๋ธ ๋ก๋
tokenizer = AutoTokenizer.from_pretrained("YOUR_USERNAME/final_depression_model")
model = AutoModelForSequenceClassification.from_pretrained("YOUR_USERNAME/final_depression_model")
model.eval()
# ์์ธก
def predict(text):
inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True)
with torch.no_grad():
outputs = model(**inputs)
probs = torch.softmax(outputs.logits, dim=-1)
prediction = torch.argmax(probs, dim=-1).item()
return {
"label": prediction, # 0=์ ์, 1=์ฐ์ธ/๋ถ์
"confidence": probs[0][prediction].item()
}
# ์ฌ์ฉ ์์
result = predict("์์ฆ ๋๋ฌด ํ๋ค๊ณ ์๋ฌด๊ฒ๋ ํ๊ธฐ ์ซ์ด์")
print(result)
```
## Model Details
- **Architecture:** BertForSequenceClassification
- **Hidden Size:** 768
- **Attention Heads:** 12
- **Hidden Layers:** 12
- **Vocab Size:** 30,000
- **Max Position Embeddings:** 300
## Intended Use
์ด ๋ชจ๋ธ์ ์ ์ ๊ฑด๊ฐ ๊ด๋ จ ์ฐ๊ตฌ ๋ฐ ์ฑ๋ด ์๋น์ค์์ ์ฌ์ฉ์์ ๊ฐ์ ์ํ๋ฅผ ํ์
ํ๊ธฐ ์ํ ๋ชฉ์ ์ผ๋ก ๊ฐ๋ฐ๋์์ต๋๋ค.
## Limitations
- ์ด ๋ชจ๋ธ์ ์ ๋ฌธ์ ์ธ ์๋ฃ ์ง๋จ ๋๊ตฌ๊ฐ ์๋๋๋ค.
- ์ค์ ์ฐ์ธ์ฆ/๋ถ์์ฅ์ ์ง๋จ์ ๋ฐ๋์ ์ ๋ฌธ ์๋ฃ์ง๊ณผ ์๋ดํ์ธ์.
- ๋ชจ๋ธ์ ์์ธก ๊ฒฐ๊ณผ๋ ์ฐธ๊ณ ์ฉ์ผ๋ก๋ง ์ฌ์ฉํด์ผ ํฉ๋๋ค.
## License
MIT License
|