Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 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 โ
|
| 3 |
-
|
|
|
|
| 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="
|
| 214 |
|
| 215 |
gr.HTML("""
|
| 216 |
<div class="app-header">
|
| 217 |
-
<h1>๐ง
|
| 218 |
-
<p>
|
| 219 |
-
<span class="badge">Research Demo ยท DistilBERT
|
| 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 |
|