Spaces:
Build error
Build error
metadata
title: Early Depression Detection MCP Agent
emoji: π§
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 6.0.1
app_file: app.py
pinned: true
tags:
- mcp-in-action-track-consumer
- depression-detection
- mental-health
- longformer
- mcp
- agents
license: mit
short_description: MCP-enabled depression detection agent
π§ Early Depression Detection MCP Agent
Hackathon: MCP 1st Birthday - Track 2: MCP in Action (Consumer)
Author: Hassan Hassanzadeh Aliabadi | LinkedIn
πΉ Demo Video
[INSERT YOUTUBE/LOOM LINK HERE]
π± Social Media Post
[INSERT LINKEDIN/X POST LINK HERE]
π― Project Description
This MCP-enabled agent detects depression risk from social media text using Mental-Longformer, achieving F1-score of 0.7668 on eRisk 2025 test data.
Key Features:
- π 4,096-token context window (8x BERT's capacity)
- π Trained on eRisk 2017-2022 datasets
- π€ Data augmentation with Gemini 2.5 Flash Lite
- β‘ Real-time linguistic pattern analysis
- π MCP-enabled for agent integration
Model: avtak/erisk-longformer-depression-v1
π§ͺ How It Works
The agent analyzes long-form text for linguistic markers including:
- Anhedonia (loss of interest)
- Self-focused negative language
- Social withdrawal indicators
- Hopelessness themes
- Disrupted sleep/energy patterns
π Research Background
Built on Master's thesis research at University of Malaya, this model addresses critical challenges in early depression detection:
- Handles imbalanced datasets through LLM-powered augmentation
- Captures long-context dependencies (4096 vs 512 tokens)
- Rigorous 5-fold cross-validation (mean F1: 0.862, std: 0.009)
- Validated on held-out eRisk 2025 test set
π₯ Team
- Hassan Hassanzadeh Aliabadi (@avtak)
β οΈ Ethical Considerations
This is a research tool, not a medical diagnostic instrument. Always consult qualified healthcare professionals for mental health concerns.
Crisis Resources:
- π Crisis Text Line: Text HOME to 741741 (US)
- π International: befrienders.org