Make the most of Docker support in Lambda to host your models without the need for dedicated servers.

Image by Markus Spiske on Unsplash

Previously AWS Lambda deployment packages were limited to a maximum unzipped size of 250MB including requirements. This proved to be an obstacle when attempting to host Machine Learning models using the service, as common ML libraries and complex models led to deployment packages far larger than the 250MB limit.

However in December 2020 AWS announced support for packaging and deployment of Lambda functions as Docker Images. Critically in the context of Machine Learning, these images can be up to 10GB in size. This means that large dependencies (e.g. …

Full working example to serve your model using asynchronous Celery tasks and FastAPI.

Photo by Arnold Francisca on UnSplash


There is an abundance of material online related to building and training all kinds of machine learning models. However once a high performance model has been trained there is significantly less material for how to put it into production.

This post walks through a working example for serving a ML model using Celery and FastAPI. All code can be found in the repository here.

We won’t specifically discuss the ML model used for this example however it was trained using example Bank customer churn data ( …

Keep up-to-date with public sentiment using live tweets and an easy-to-build Streamlit web app.

Streamlit makes it easy to turn Data Science projects into web apps and dashboards (Image by Author)

Twitter can be used as a data source for various data science projects, including Geo-spatial analysis (where are users tweeting about certain subjects?) and sentiment analysis (how do users feel about certain subjects?).

I decided to build a dashboard that combines the two questions using the example of UK political leaders; Boris Johnson and Keir Starmer. However it’s possible to use any combination of keywords to analyse political figures, companies etc.

We can break down what needs to be done into three distinct areas:

  1. Database set-up: This can be done directly in the RDBMS of your choice, however we choose…

Jonathan Readshaw

Engineering graduate with a passion for Data Science and ML.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store