This project is made for the Python 3.11 version.
👉 You can delete this file before committing your project to GitHub.
How to run this project see the following steps:
- Clone the project.
- Build the Docker image locally (commands see below or in the Dockerfile).
- Run the Docker container locally (commands see below or in the Dockerfile) and debug your streamlit app locally until you are ready to deploy to Streamlit Cloud.
- Deploy the project to Streamlit Cloud and test it.
If you don't want to use Docker for local development, you can also use a Python virtual environment. How to setup a Python virtual environment for local development:
pip install --upgrade virtualenv
python -m venv .venv
or
python3 -m venv .venv
.venv\Scripts\activate
source .venv/bin/activate
python -m pip install --upgrade pip
pip install --upgrade -r requirements.txt
streamlit run streamlit_app.py
deactivate
This template contains a Dockerfile for local debugging and testing of the project, before deploying the project to Streamlit Cloud. This shall ease the process of developing and deploying projects to Streamlit Cloud, without endless back-and-forth trial-and-error between the local development environment, GitHub and Streamlit Cloud.
The Dockerfile is based on python:3.11-slim
image and shall mimic the Streamlit Cloud runtime as closely as possible.
Hint: If you run the Dockerfile locally on a Windows host system, you have to uncomment the [server]
settings in the .streamlit/config.toml
file. Comment on these lines again before deploying the project to Streamlit Cloud.
To build the docker image locally, run the following command:
docker build -t dengue --progress=plain .
Then to run the docker container locally, run the following command:
docker run -p 8501:8501 dengue
👉 For more details, look into the Dockerfile file itself.
To deploy the project to Streamlit Cloud, you have to create a new project on Streamlit Cloud and connect it to your GitHub repository. How to deploy a project to Streamlit Cloud see in the official documentation here.
See also the official documentation from Streamlit about docker deployments:
https://docs.streamlit.io/knowledge-base/tutorials/deploy/docker
District | Best Model | RMSE Score |
---|---|---|
Ampara | Random Forest with Co-variates | 4.4 |
Anuradhapura | Random Forest | 3 |
Badulla | Transformer Model | 4.76 |
Batticaloa | Random Forest with Co-variates | 5.3 |
Colombo | Regression M. with Co-variates | 16 |
Galle | Regression Model | 6.37 |
Gampaha | ARIMA | 15 |
Hambantota | ARIMA | 7.3 |
Jaffna | Catboost Model | 8.79 |
Kalutara | Random Forest | 13.3 |
Kandy | Transformer Model | 11.6 |
Kegalle | LightGBM Model | 11.38 |
Kilinochchi | Regression Model | 1.27 |
Kurunegela | ARIMA | 8.2 |
Mannar | Linear Regression Model | 3 |
Matale | Linear Regression Model | 4 |
Matara | Catboost | 9.13 |
Monaragala | AutoARIMA | 3.64 |
Mullaitivu | XGBModel | 0.8 |
Nuwara Eliya | Catboost Model | 1.6 |
Polonnaruwa | Transformer Model | 1.96 |
Puttalam | RandomForest | 3.37 |
Ratnapura | Transformer Model | 34 |
Trincomalee | Random Forest with Co-variates | 4.16 |
Vavuniya | RandomForest | 0.92 |
Average RMSE: 7.3