Documentation

Installation Guide

BabyBloom AI - Pregnancy Health Monitoring and Risk Prediction System with ML-Powered Analysis and AI Chatbot

Step-by-step Setup Verified Instructions Chat Support
Back to Project
Complete Guide

How to install and run BabyBloom AI on your computer

Follow these steps to get the BabyBloom AI pregnancy health monitoring system running on your local machine. The entire setup takes about 10 minutes.

Prerequisites

Make sure you have the following installed before you begin:

  • Python 3.10 or higher (download from python.org if you do not have it)
  • pip (comes bundled with Python)
  • A code editor like VS Code (optional but recommended)
  • A free Groq API key (sign up at console.groq.com)

Step 1: Extract the project files

After purchasing, download the ZIP file and extract it to a folder on your computer. Open a terminal (Command Prompt on Windows, Terminal on macOS/Linux) and navigate to the main project directory:

cd prj_preg

Step 2: Create a virtual environment

A virtual environment keeps the project dependencies separate from your system Python. Create one by running:

python -m venv venv

Step 3: Activate the virtual environment

On macOS or Linux:

source venv/bin/activate

On Windows:

venv\Scripts\activate

You should see (venv) appear at the beginning of your terminal prompt. This confirms the virtual environment is active.

Step 4: Install the required Python packages

Run the following command to install all dependencies at once:

pip install django pillow python-dotenv groq tensorflow scikit-learn joblib

This installs Django (web framework), Pillow (image handling for profile pictures), python-dotenv (environment variable management), Groq (AI chatbot API), TensorFlow (ML model), scikit-learn (data preprocessing), and joblib (model serialization).

Step 5: Set up environment variables

Create a new file named .env in the same folder as manage.py. Add the following two lines:

GROQ_API_KEY=your_groq_api_key_here
SECRET_KEY=your_django_secret_key_here

Replace your_groq_api_key_here with the API key you obtained from console.groq.com. To generate a Django secret key, run this in your terminal:

python -c "from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())"

Copy the output and paste it as the SECRET_KEY value in your .env file.

Step 6: Apply database migrations

This command creates all the necessary database tables (Profile, HealthMetric, Goal, Medicine, JournalEntry):

python manage.py migrate

Step 7: Create an admin account (optional)

If you want to access the Django admin panel at /admin/, create a superuser:

python manage.py createsuperuser

Follow the prompts to set a username, email, and password.

Step 8: Start the development server

python manage.py runserver

Step 9: Open the application

Open your web browser and go to:

http://127.0.0.1:8000

You will see the BabyBloom AI landing page with login and registration forms.

Step 10: Register and start using the platform

Click "Register" and fill in your name, email, password, age, and current trimester. After registration, log in to access the dashboard, risk analysis, AI chatbot, medicine tracker, and goals features.

Troubleshooting

If TensorFlow throws a version error when loading the ML model, the application will automatically switch to the rule-based prediction engine. Everything else continues to work normally. To fix this, try installing a specific TensorFlow version: pip install tensorflow==2.15.0

If the AI chatbot does not respond, verify that your GROQ_API_KEY is correct and that your machine has an active internet connection.

Medicine reminder emails appear in your terminal by default. To send real emails, update the EMAIL_BACKEND setting in prj_preg/settings.py with your SMTP (Gmail) credentials.

If you face any difficulties during setup, CodeAj offers a live project setup service where an expert walks you through the installation over a Google Meet session. Visit the setup service page to book a session.

Need Help?

Our team is here to assist you with installation and setup.

Chat with Us
Chat with us