Update README.md
Browse files
README.md
CHANGED
|
@@ -8,5 +8,68 @@ sdk_version: 6.8.0
|
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
---
|
|
|
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
+
# 🌿 心理健康風險程度測試 (DASS-12)
|
| 12 |
|
| 13 |
+
這是一個基於 **DASS (Depression, Anxiety and Stress Scale)** 簡化版開發的自動化心理健康評估工具。透過 12 題心理狀態問答,利用機器學習模型預測潛在的心理健康風險程度。
|
| 14 |
+
|
| 15 |
+
## 🚀 功能特點
|
| 16 |
+
- **即時評估**:透過互動式介面,5 分鐘內獲得評估結果。
|
| 17 |
+
- **三維度分析**:分別計算「焦慮」、「憂鬱」與「壓力」的分數比重。
|
| 18 |
+
- **雲端紀錄**:測試結果會自動去識別化並加密儲存至後端雲端資料庫(Google Sheets),供學術研究與趨勢分析。
|
| 19 |
+
- **歷史紀錄**:支援瀏覽器當次 Session 的歷史紀錄查看。
|
| 20 |
+
|
| 21 |
+
## 🛠 技術棧
|
| 22 |
+
- **前端介面**: [Gradio](https://gradio.app/)
|
| 23 |
+
- **數據處理**: Pandas, Numpy
|
| 24 |
+
- **機器學習**: LightGBM (LGBMClassifier)
|
| 25 |
+
- **後端儲存**: Google Sheets API (via gspread)
|
| 26 |
+
- **部署環境**: Hugging Face Spaces
|
| 27 |
+
|
| 28 |
+
## 📁 檔案說明
|
| 29 |
+
- `app.py`: Gradio 主程式與邏輯控制。
|
| 30 |
+
- `DASS_model.bin`: 已訓練完成的機器學習模型。
|
| 31 |
+
- `AutoPreprocess.py`: 自定義數據預處理類別。
|
| 32 |
+
- `requirements.txt`: 專案執行環境所需的 Python 套件清單。
|
| 33 |
+
|
| 34 |
+
## 🔐 隱私聲明
|
| 35 |
+
本專案極為重視使用者隱私:
|
| 36 |
+
1. 使用者輸入之「暱稱」僅用於介面呈現,**不會**被傳送至雲端資料庫,亦**不會**用於模型計算。
|
| 37 |
+
2. 儲存之數據包含:測試時間、人口學基本資訊(性別/年齡/家庭人數)、各維度分數及 12 題原始答案。
|
| 38 |
+
3. 本工具非醫療器材,結果僅供參考。
|
| 39 |
+
|
| 40 |
+
## 👥 開發團隊
|
| 41 |
+
- 第四組:心理健康風險預測小組 🌿
|
| 42 |
+
|
| 43 |
+
- # 🌿 Psychological Health Risk Assessment (DASS-12)
|
| 44 |
+
|
| 45 |
+
This is an automated psychological health evaluation tool based on the simplified **DASS (Depression, Anxiety and Stress Scale)**. It leverages a Machine Learning model to predict potential mental health risk levels based on 12 psychological state questions.
|
| 46 |
+
|
| 47 |
+
## 🚀 Key Features
|
| 48 |
+
- **Instant Assessment**: Interactive interface that provides evaluation results within 5 minutes.
|
| 49 |
+
- **Three-Dimensional Analysis**: Calculates and visualizes specific scores for Anxiety, Depression, and Stress.
|
| 50 |
+
- **Cloud-Based Storage**: Test results are anonymized and securely stored in a cloud database (Google Sheets) for academic research and trend analysis.
|
| 51 |
+
- **Session History**: Supports viewing history logs within the current browser session.
|
| 52 |
+
|
| 53 |
+
## 🛠 Technical Stack
|
| 54 |
+
- **Frontend Interface**: [Gradio](https://gradio.app/)
|
| 55 |
+
- **Data Processing**: Pandas, Numpy
|
| 56 |
+
- **Machine Learning**: LightGBM (LGBMClassifier)
|
| 57 |
+
- **Backend Storage**: Google Sheets API (via gspread)
|
| 58 |
+
- **Deployment**: Hugging Face Spaces
|
| 59 |
+
|
| 60 |
+
## 📁 File Structure
|
| 61 |
+
- `app.py`: The main Gradio application logic.
|
| 62 |
+
- `DASS_model.bin`: The pre-trained machine learning model.
|
| 63 |
+
- `AutoPreprocess.py`: Custom data preprocessing class.
|
| 64 |
+
- `requirements.txt`: List of Python dependencies required for execution.
|
| 65 |
+
|
| 66 |
+
## 🔐 Privacy & Ethics
|
| 67 |
+
Privacy is our top priority:
|
| 68 |
+
1. **Anonymity**: The "Nickname" input is used solely for the user interface and is **NEVER** transmitted to the database or used in model calculations.
|
| 69 |
+
2. **Data Collection**: Collected data includes: timestamp, basic demographics (Gender/Age/Family Size), dimensional scores, and the 12 raw responses.
|
| 70 |
+
3. **Disclaimer**: This tool is not a medical device. Results are for reference only and do not constitute a formal diagnosis.
|
| 71 |
+
|
| 72 |
+
## 👥 Development Team
|
| 73 |
+
- Group 4: Mental Health Risk Prediction Team 🌿
|
| 74 |
+
-
|
| 75 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|