--- title: DASS QuickText Model emoji: 📚 colorFrom: indigo colorTo: red sdk: gradio sdk_version: 6.8.0 app_file: app.py pinned: false --- # 🌿 心理健康風險程度測試 (DASS-12) 這是一個基於 **DASS (Depression, Anxiety and Stress Scale)** 簡化版開發的自動化心理健康評估工具。透過 12 題心理狀態問答,利用機器學習模型預測潛在的心理健康風險程度。 ## 🚀 功能特點 - **即時評估**:透過互動式介面,5 分鐘內獲得評估結果。 - **三維度分析**:分別計算「焦慮」、「憂鬱」與「壓力」的分數比重。 - **雲端紀錄**:測試結果會自動去識別化並加密儲存至後端雲端資料庫(Google Sheets),供學術研究與趨勢分析。 - **歷史紀錄**:支援瀏覽器當次 Session 的歷史紀錄查看。 ## 🛠 技術棧 - **前端介面**: [Gradio](https://gradio.app/) - **數據處理**: Pandas, Numpy - **機器學習**: LightGBM (LGBMClassifier) - **後端儲存**: Google Sheets API (via gspread) - **部署環境**: Hugging Face Spaces ## 📁 檔案說明 - `app.py`: Gradio 主程式與邏輯控制。 - `DASS_model.bin`: 已訓練完成的機器學習模型。 - `AutoPreprocess.py`: 自定義數據預處理類別。 - `requirements.txt`: 專案執行環境所需的 Python 套件清單。 ## 🔐 隱私聲明 本專案極為重視使用者隱私: 1. 使用者輸入之「暱稱」僅用於介面呈現,**不會**被傳送至雲端資料庫,亦**不會**用於模型計算。 2. 儲存之數據包含:測試時間、人口學基本資訊(性別/年齡/家庭人數)、各維度分數及 12 題原始答案。 3. 本工具非醫療器材,結果僅供參考。 ## 👥 開發團隊 - 第四組:心理健康風險預測小組 🌿 - # 🌿 Psychological Health Risk Assessment (DASS-12) 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. ## 🚀 Key Features - **Instant Assessment**: Interactive interface that provides evaluation results within 5 minutes. - **Three-Dimensional Analysis**: Calculates and visualizes specific scores for Anxiety, Depression, and Stress. - **Cloud-Based Storage**: Test results are anonymized and securely stored in a cloud database (Google Sheets) for academic research and trend analysis. - **Session History**: Supports viewing history logs within the current browser session. ## 🛠 Technical Stack - **Frontend Interface**: [Gradio](https://gradio.app/) - **Data Processing**: Pandas, Numpy - **Machine Learning**: LightGBM (LGBMClassifier) - **Backend Storage**: Google Sheets API (via gspread) - **Deployment**: Hugging Face Spaces ## 📁 File Structure - `app.py`: The main Gradio application logic. - `DASS_model.bin`: The pre-trained machine learning model. - `AutoPreprocess.py`: Custom data preprocessing class. - `requirements.txt`: List of Python dependencies required for execution. ## 🔐 Privacy & Ethics Privacy is our top priority: 1. **Anonymity**: The "Nickname" input is used solely for the user interface and is **NEVER** transmitted to the database or used in model calculations. 2. **Data Collection**: Collected data includes: timestamp, basic demographics (Gender/Age/Family Size), dimensional scores, and the 12 raw responses. 3. **Disclaimer**: This tool is not a medical device. Results are for reference only and do not constitute a formal diagnosis. ## 👥 Development Team - Group 4: Mental Health Risk Prediction Team 🌿 - Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference