Building High - Performance APIs and Real - Time Object Detection Systems
1. Caching Results with Joblib
When working on prediction tasks, caching results can significantly enhance the performance of your application. With Joblib, we can cache prediction results to avoid redundant computations.
1.1 Prediction Method
In the predict method, instead of directly performing the prediction inside the method, we call an external predict function. We pass the model and input text as arguments. After getting the prediction, we retrieve the corresponding category name and build a PredictionOutput object.
1.2 REST API Endpoints
We have two important REST API endpoints:
-
高性能API与实时目标检测系统
超级会员免费看
订阅专栏 解锁全文
1102

被折叠的 条评论
为什么被折叠?



