gamzaS2 commited on
Commit
0acede6
ยท
verified ยท
1 Parent(s): 1dd7977

Upload README.md with huggingface_hub

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