Machine Learning Models with FastAPI, Streamlit and Docker

Learn how to serve a machine learning model with FastAPI, Streamlit and Docker

The course “Serving a Machine Learning Model with FastAPI, Streamlit and Docker” is designed to provide learners with a comprehensive understanding of deploying a machine learning model using FastAPI, Streamlit, and Docker. This course is suitable for developers, data scientists, or anyone interested in deploying machine learning models in production.

What you’ll learn

  • Develop an asynchronous API with Python and FastAPI.
  • Serve up a machine learning model with FastAPI.
  • Develop a UI with Streamlit.
  • Containerize FastAPI and Streamlit with Docker.
  • Leverage asyncio to execute code in the background outside the request/response flow.

Course Content

  • Introduction –> 4 lectures • 8min.
  • FastAPI and Docker Backend –> 3 lectures • 27min.
  • Streamlit and Docker Frontend –> 2 lectures • 14min.
  • Asynchronous Model Serving –> 2 lectures • 15min.
  • Conclusion –> 2 lectures • 1min.

Machine Learning Models with FastAPI, Streamlit and Docker

Requirements

The course “Serving a Machine Learning Model with FastAPI, Streamlit and Docker” is designed to provide learners with a comprehensive understanding of deploying a machine learning model using FastAPI, Streamlit, and Docker. This course is suitable for developers, data scientists, or anyone interested in deploying machine learning models in production.

The course will begin with an introduction to the basics of deploying machine learning model. Learners will then be introduced to FastAPI, an efficient and easy-to-use web framework for building APIs in Python, and learn how to create a RESTful API for their machine learning model.

Next, learners will be introduced to Streamlit, a powerful web application framework for creating interactive data visualizations and deploying machine learning models. The course will teach learners how to use Streamlit to create a user-friendly interface to interact with the machine learning model and visualize the model’s predictions.

Finally, learners will be introduced to Docker, a popular platform for building, shipping, and running applications in containers. The course will teach learners how to containerize their machine learning model using Docker, making it easy to deploy and scale.

By the end of this course, learners will have gained hands-on experience in deploying machine learning models using FastAPI, Streamlit, and Docker. They will have the skills and knowledge to build and deploy their own machine learning models in production environments, and be able to demonstrate their ability to deploy machine learning models on a resume or portfolio.

In this course, we’re going to build a style transfer application based on the Perceptual Losses for Real-Time Style Transfer and Super-Resolution paper and Justin Johnson’s pre-trained models. We’ll use FastAPI as the backend to serve our predictions, Streamlit for the user interface, and OpenCV to do the actual prediction. Docker will be used as well.

By the end of this course, you will be able to:

  1. Develop an asynchronous API with Python and FastAPI
  2. Serve up a machine learning model with FastAPI
  3. Develop a UI with Streamlit
  4. Containerize FastAPI and Streamlit with Docker
  5. Leverage asyncio to execute code in the background outside the request/response flow
Get Tutorial