Summary
Congratulations! You're now able to build a fast and efficient REST API to serve your machine learning models. Thanks to Joblib, you've learned how to dump a trained scikit-learn estimator into a file that's easy to load and use inside your application. We've also seen an approach to caching prediction results using Joblib. Finally, we discussed how FastAPI handles synchronous operations by sending them to a separate thread to prevent blocking. While this was a bit technical, it's important to bear this aspect in mind when dealing with blocking I/O operations.
We're near the end of our FastAPI journey. Before letting you build awesome data science applications by yourself, we have provided one last chapter to push this a bit further: using WebSockets and a library dedicated to computer vision, OpenCV, we'll learn how to implement an application that can perform real-time face detection.