🧠 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)
  • Hugging Face Token (Optional, for dataset access)

Installation

  1. Clone the repository:
    git clone https://github.com/your-username/mental-health-classifier.git
    cd mental-health-classifier
    
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference API
Unable to determine this model's library. Check the docs .

Collection including farah1/mental-health-posts-classifier