Skip to content

NeilIsrani/AICoach

Repository files navigation

HealthBud - Sports Injury Prediction System

Python Flask MySQL Kafka scikit-learn

HealthBud is a comprehensive sports injury prediction system that leverages machine learning to predict potential injuries based on athlete data. The system uses a microservices architecture with Kafka for real-time data processing and Flask for the web interface.

🚀 Features

  • Real-time injury prediction using machine learning models
  • RESTful API endpoints for data management
  • Kafka-based event streaming for data processing
  • MySQL database for persistent storage
  • Interactive web interface for data visualization
  • Coach and athlete management system

📋 Prerequisites

  • Python 3.8 or higher
  • MySQL Server
  • Apache Kafka
  • Virtual environment (recommended)

🛠️ Installation

  1. Clone the repository:
git clone https://github.com/yourusername/healthbud.git
cd healthbud
  1. Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Set up the database:
mysql -u your_username -p < coachdatabase.sql
  1. Configure environment variables: Create a .env file in the root directory with the following variables:
DB_HOST=localhost
DB_USER=your_username
DB_PASSWORD=your_password
DB_NAME=healthbud
KAFKA_BOOTSTRAP_SERVERS=localhost:9092

🏃‍♂️ Running the Application

  1. Start the Kafka consumer:
python kafka_consumer.py
  1. Start the Flask application:
python flask_app.py
  1. Start the Kafka producer (in a separate terminal):
python kafka_producer.py

The application will be available at http://localhost:5000

About

An artificially intelligent and LLM-powered running coach

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published