BabyBloom AI - Pregnancy Health Monitoring and Risk Prediction System with ML-Powered Analysis and AI Chatbot
Back to ProjectFollow these steps to get the BabyBloom AI pregnancy health monitoring system running on your local machine. The entire setup takes about 10 minutes.
Make sure you have the following installed before you begin:
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
A virtual environment keeps the project dependencies separate from your system Python. Create one by running:
python -m venv venv
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.
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).
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.
This command creates all the necessary database tables (Profile, HealthMetric, Goal, Medicine, JournalEntry):
python manage.py migrate
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.
python manage.py runserver
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.
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.
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.
Our team is here to assist you with installation and setup.