zkmine commited on
Commit
cb75f56
ยท
verified ยท
1 Parent(s): f4420cd

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. README.md +9 -1
  2. app.py +7 -7
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- title: Mental Health Triage Assistant
3
  emoji: ๐Ÿง 
4
  colorFrom: blue
5
  colorTo: red
@@ -8,4 +8,12 @@ sdk_version: 5.33.0
8
  app_file: app.py
9
  pinned: false
10
  license: mit
 
11
  ---
 
 
 
 
 
 
 
 
1
  ---
2
+ title: Undertone
3
  emoji: ๐Ÿง 
4
  colorFrom: blue
5
  colorTo: red
 
8
  app_file: app.py
9
  pinned: false
10
  license: mit
11
+ short_description: mental health message triage.
12
  ---
13
+
14
+ # ๐Ÿง  Undertone
15
+
16
+ **The signal beneath the surface.**
17
+
18
+ A fine-tuned DistilBERT classifier that triages mental health support messages into three categories with a focus on surfacing subtle distress cues.
19
+
app.py CHANGED
@@ -1,6 +1,7 @@
1
  """
2
- app.py โ€” Mental Health Triage Assistant
3
- Gradio interface๏ผŒ้ƒจ็ฝฒๅˆฐ HuggingFace Spaces
 
4
  """
5
 
6
  import torch
@@ -11,7 +12,6 @@ from transformers import (
11
  DistilBertForSequenceClassification,
12
  )
13
 
14
- # โ”€โ”€ ้…็ฝฎ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
15
  MODEL_DIR = Path(__file__).parent / "model" / "saved"
16
 
17
  LABEL2ID = {"informational": 0, "emotional_support": 1, "escalation": 2}
@@ -210,13 +210,13 @@ body, .gradio-container {
210
  """
211
 
212
  # โ”€โ”€ ็•Œ้ข โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
213
- with gr.Blocks(css=CUSTOM_CSS, title="Mental Health Triage") as demo:
214
 
215
  gr.HTML("""
216
  <div class="app-header">
217
- <h1>๐Ÿง  Mental Health Triage Assistant</h1>
218
- <p>Classifies support messages to help route them to the right response level</p>
219
- <span class="badge">Research Demo ยท DistilBERT ยท Duke AIPI 561</span>
220
  </div>
221
  """)
222
 
 
1
  """
2
+ app.py โ€” Undertone
3
+ The signal beneath the surface.
4
+ Mental Health Triage Assistant ยท Gradio interface for HuggingFace Spaces
5
  """
6
 
7
  import torch
 
12
  DistilBertForSequenceClassification,
13
  )
14
 
 
15
  MODEL_DIR = Path(__file__).parent / "model" / "saved"
16
 
17
  LABEL2ID = {"informational": 0, "emotional_support": 1, "escalation": 2}
 
210
  """
211
 
212
  # โ”€โ”€ ็•Œ้ข โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
213
+ with gr.Blocks(css=CUSTOM_CSS, title="Undertone") as demo:
214
 
215
  gr.HTML("""
216
  <div class="app-header">
217
+ <h1>๐Ÿง  Undertone</h1>
218
+ <p>The signal beneath the surface โ€” mental health message triage</p>
219
+ <span class="badge">Research Demo ยท DistilBERT Fine-Tuned</span>
220
  </div>
221
  """)
222