Documentation

Installation Guide

CellPulse EV Battery Health Prediction Final Year Project (Flask + ML)

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

Prerequisites

First, make sure you have Python installed. If you don't, grab it from python.org — get the latest 3.10.x version. You'll also need pip, which comes bundled with Python, so that's usually one less thing to worry about.

Step-by-Step Setup

1. Get the project files

Extract the downloaded project folder wherever you keep your college project work. Open a terminal (or Command Prompt on Windows) and navigate into the "EV Battery Health Prediction" folder.

2. Create a virtual environment (recommended, not compulsory)

Run python -m venv venv. Then activate it — on Windows that's venv\Scripts\activate, on macOS/Linux it's source venv/bin/activate. This keeps your project's libraries separate from anything else on your system, which saves you headaches later.

3. Install dependencies

Run pip install -r requirements.txt. This pulls in Flask, pandas, scikit-learn, and joblib along with a few smaller packages. Give it a minute or two depending on your internet speed.

4. Check the model files

Open the models/ folder and confirm all 8 .pkl files are present: battery_health_model.pkl, battery_health_scaler.pkl, battery_health_label_encoders.pkl, battery_health_feature_config.pkl, battery_failure_classifier.pkl, battery_failure_scaler.pkl, battery_failure_label_encoders.pkl, and battery_failure_feature_config.pkl. These come pre-included, so you shouldn't need to touch the notebook at all unless you specifically want to retrain.

5. Run the app

Run python app.py from the project folder. You should see Flask start up and mention it's running on http://127.0.0.1:5000.

How to Verify It's Working

Open http://127.0.0.1:5000 in your browser. Go to the Predict page, click Load Sample Data, then Run Prediction. If you see a battery health percentage and a failure risk label pop up, everything's wired correctly.

Common Issues

ModuleNotFoundError on startup — this almost always means requirements.txt didn't install fully, or you're running the app outside your virtual environment. Reactivate the venv and reinstall.

Predictions look off or the app crashes on submit — double-check the models/ folder has all 8 files with the exact names listed above. A missing scaler or encoder file is the usual culprit here.

Need Help?

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

Chat with Us