Traffic Accident Severity Prediction System using Machine Learning with SHAP Explainability and Flask Web App
Back to ProjectFollow these steps in order to set up and run the project on your computer. The whole process takes around 10 to 15 minutes.
Make sure the following are installed before you begin:
Unzip the downloaded file and open the accident_severity_project folder in your code editor.
This keeps the project dependencies separate from your system. On Windows, run:
python -m venv venv venv\Scripts\activate
On Mac or Linux, run:
python3 -m venv venv source venv/bin/activate
With the virtual environment active, install everything the project needs:
pip install -r requirements.txt pip install flask
Open the notebooks folder and run these four notebooks fully, in this exact order. Each one must finish before you move to the next.
Note: notebooks 02 and 03 are required for the prediction page. Notebooks 03 and 04 are required for the performance page.
From inside the accident_severity_project folder, run:
python app/flask_app.py
Visit the address below to use the app:
http://127.0.0.1:5000
You can explore four pages: Home, Predict, EDA dashboard, and Performance. To stop the server, press Ctrl + C in the terminal.
Our team is here to assist you with installation and setup.