Predict new cases of covid-19 infections
Explore the tutorial »
This is the API Code for my tutorial article:
It paints a picture for developing a machine learning Python API from start to finish and provides help in more difficult areas like the setup with AWS Lambda.
You will find the end result on Rapidapi:
We will use the dataset from https://ourworldindata.org/coronavirus-source-data in csv format.
- License of data is Attribution 4.0 International (CC BY 4.0)
- Source code available on Github
- Github (Code hosting),
- Anaconda (Dependency and environment management),
- Docker (for possible further usage in microservices)
- Jupyter Notebook (code development and documentation),
- Python (programming language),
- AWS, especiall AWS Lambda and S3(for deployment),
- Rapidapi (market to sell)
covering rough data preparation, training, tuning and prediction.
git clone https://github.com/Createdd/ml_api_covid.git
docker build -t ml_api_covid .
docker run -d -p 80:8080 ml_api_covid
git clone https://github.com/Createdd/ml_api_covid.git
- Create conda environment
conda create --name NAME python=3.7
- Register new environment in jupyter
ipython kernel install --name NAME--user
- Activate conda environment
conda activate PATH_TO_ENVIRONMENT
pip install -r requirements.txt
Note: If you want to to do exploration with Jypter Notebook you would need to install the Conda environment as the Docker setup only works for the production part (Flask server) of the app.
Daniel is an entrepreneur, software developer and lawyer. His knowledge and interests currently revolve around programming machine learning applications and all its related aspects.
Connect on:
If this was helpful for you consider showing support:
- Create an upload script
- Create a script for deployment. meaning to
- uninstall unused deps
- install prod deps
- do zappa deploy dev