metadata
license: apache-2.0
🧠 Mental Health Text Classifier
This repository contains an AI-powered tool designed to classify text into one of the following mental health categories:
- Stress
- Anxiety
- Depression
- Other
It leverages OpenAI's GPT-4 for classification using few-shot learning, combined with BM25 for contextual similarity.
Features
- User-Friendly Interface: Easy-to-use Gradio-powered web application.
- Interactive Classification: Real-time text input and predictions.
- Extensibility: Reusable
MentalHealthClassifier
model for integration into other projects.
How It Works
- The user provides a text input (e.g., thoughts or feelings).
- The tool uses BM25 to retrieve similar examples from the training data.
- GPT-4 analyzes the input and predicts the best-fitting mental health category.
Prerequisites
- Python 3.8+
- OpenAI API Key (Get one from OpenAI)
- Hugging Face Token (Optional, for dataset access)
Installation
- Clone the repository:
git clone https://github.com/your-username/mental-health-classifier.git cd mental-health-classifier