Machine learning is a hot topic at present. With technology companies moving in the direction of artificial intelligence and machine learning to cash in early, the field has grown tremendously large. Many of these companies create their own machine learning solutions and sell them to others using a subscription-based model.

Since the majority of machine learning models are developed in Python, the web frameworks that serve them up are usually Python-based as well. For a long time, Flask, a micro-framework, was the goto framework. But that’s changing. A new framework, designed to compensate for almost everything Flask lacks is becoming more and more popular. It’s called FastAPI.

FastAPI is faster than Flask because it brings asynchronous function handlers to the table:

Web Framework Benchmarks


Serving a Machine Learning Model with FastAPI and Streamlit
10.80 GEEK