Skip to content

EgonLh/_moodflag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mood Swing Prediction API and Streamlit Web App

Problem Statement

In today's fast-paced world, mental health challenges like mood swings often go unnoticed or undiagnosed, leading to severe consequences for individuals' well-being. While professional care is essential, early detection using accessible and non-invasive methods can help people become more aware of their mental state and seek support when necessary. This project aims to provide a lightweight, AI-powered solution that predicts mood swing tendencies based on survey-style inputs, making it easier to monitor and reflect on mental health.

Project Overview

  • A FastAPI-based RESTful API for making predictions.
  • A Streamlit web application for users to interact with the model via a simple UI.

Features

  • Input form for mental health and lifestyle-related data
  • Real-time mood swing prediction
  • Simple API to connect front-end and back-end

Tech Stack

  • Python 3.10+
  • Scikit-learn
  • XGBoost
  • Pandas, NumPy
  • FastAPI
  • Streamlit
  • Joblib

Folder Structure

├── app/
│   ├── main.py             # FastAPI app for serving predictions
├── model/
│   ├── xgb_model.pkl       # Trained XGBoost model
│   ├── encoder.pkl         # Saved label encoders (as a dictionary)
│   ├── train_model.py      # Script to train and save the model
├── streamlit_app/
│   ├── app.py              # Streamlit web application
├── data/
│   ├── raw_data.csv         # Original dataset
│   └── cleaned_data.csv     # Cleaned and preprocessed dataset
├── PipFile                  # Python dependencies
└── README.md

MoodFlag Project Resources

Frontend

Backend (API)

Dataset & Model Exploration


About

An interactive web application that predicts mental health risk based on user input

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published