Documentation

Installation Guide

HantaTrack AI — Hantavirus Outbreak Prediction System using Machine Learning, Time-Series Forecasting and Environmental Risk Analysis

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

HantaTrack AI Installation Guide

Follow these steps to install and run the Hantavirus Outbreak Prediction System on your local machine. The setup works on Windows, macOS, and Linux.

Prerequisites

  • Python 3.9 or higher
  • pip package manager
  • 2 GB free disk space
  • 4 GB RAM minimum, 8 GB recommended
  • A code editor such as VS Code or PyCharm

Step 1 - Extract the Project

Unzip the downloaded project folder to a location of your choice. Open a terminal or command prompt and navigate into the extracted folder.

cd "hanta virus"

Step 2 - Create a Virtual Environment

Create an isolated Python environment so that project dependencies do not conflict with your global packages.

python -m venv venv

Activate it on Windows:

venv\Scripts\activate

Activate it on macOS or Linux:

source venv/bin/activate

Step 3 - Install Notebook Dependencies

Install all the libraries needed to run the Jupyter notebook for EDA and model training.

pip install jupyter pandas numpy scikit-learn xgboost statsmodels prophet tensorflow plotly joblib seaborn matplotlib

If Prophet fails to install on Windows, use conda instead:

conda install -c conda-forge prophet

TensorFlow is optional. If it does not install, the notebook will skip the LSTM model and continue with Prophet and SARIMA.

Step 4 - Install Web App Dependencies

Move into the Flask web application folder and install its requirements.

cd hantavirus-app
pip install -r requirements.txt

Step 5 - Verify the Dataset

Make sure the dataset folder contains all six required CSV files before training. The notebook will fail if any of these are missing.

  • hantavirus_monthly_trends.csv
  • hantavirus_country_yearly.csv
  • hantavirus_environmental.csv
  • hantavirus_clinical.csv
  • hantavirus_outbreaks.csv
  • hantavirus_master.csv

Step 6 - Train the Models

From the project root, launch the Jupyter notebook.

jupyter notebook hantavirus_analysis.ipynb

Once it opens in your browser, click Kernel then Restart and Run All. The notebook will run all 57 cells, perform EDA, train all six models, and save the best artifacts. Typical runtime is three to eight minutes depending on whether TensorFlow is available.

Step 7 - Copy Models to the Web App

Move the trained model artifacts into the location where Flask expects them.

On Windows:

copy models\*.pkl hantavirus-app\models\

On macOS or Linux:

cp models/*.pkl hantavirus-app/models/

Step 8 - Start the Flask Server

Move into the web app folder if you are not already there and start the application.

cd hantavirus-app
python app.py

The server will start on http://localhost:5000. Open that URL in your browser to access the home page.

Step 9 - Verify Model Health

Open the following URL in your browser to confirm that all four model artifacts are loaded correctly.

http://localhost:5000/health

You should see a JSON response showing case_forecast_model, affected_people_model, encoder, and scaler all marked as ready.

Step 10 - Use the Application

You can now explore both prediction tools.

  • Case Forecast at /forecast lets you predict monthly Hantavirus cases for any of the 26 supported countries across 3, 6, 12, or 24 month horizons.
  • Risk Analysis at /prediction lets you predict how many people are likely to be affected based on rainfall, temperature, humidity, rodent index, and prior year cases.

Troubleshooting

  • Port 5000 already in use - edit the last line of app.py and change app.run(port=5000) to app.run(port=5001).
  • Model not found error - confirm that step 7 completed and that hantavirus-app/models contains all four pkl files.
  • Prophet installation fails on Windows - use conda install -c conda-forge prophet inside a conda environment.
  • TensorFlow errors - simply skip the LSTM cell in the notebook. Prophet and SARIMA will still produce a working forecast model.

Need Help?

If you get stuck at any step, our team offers complete project setup assistance over Google Meet, including a line-by-line code walkthrough. You can also request custom modifications, a tailored project report, a research paper, or a PPT for your final year submission directly from the CodeAj Marketplace.

Need Help?

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

Chat with Us
Chat with us