farah1's picture
Update README.md
70d2caa verified
---
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
1. The user provides a text input (e.g., thoughts or feelings).
2. The tool uses BM25 to retrieve similar examples from the training data.
3. GPT-4 analyzes the input and predicts the best-fitting mental health category.
## Prerequisites
- **Python 3.8+**
- OpenAI API Key (Get one from [OpenAI](https://platform.openai.com/signup/))
- Hugging Face Token (Optional, for dataset access)
## Installation
1. Clone the repository:
```bash
git clone https://github.com/your-username/mental-health-classifier.git
cd mental-health-classifier