From 60101337828d11f5ee5fed0d8c4ec80cde536d8a Mon Sep 17 00:00:00 2001 From: Matthias Bisping Date: Mon, 25 Apr 2022 11:18:23 +0200 Subject: [PATCH] multiple reoutes for prediction --- image_prediction/flask.py | 1 + 1 file changed, 1 insertion(+) diff --git a/image_prediction/flask.py b/image_prediction/flask.py index 7f76775..7ab4005 100644 --- a/image_prediction/flask.py +++ b/image_prediction/flask.py @@ -53,6 +53,7 @@ def make_prediction_server(predict_fn: Callable): return response @app.route("/predict", methods=["POST"]) + @app.route("/", methods=["POST"]) def predict(): # Tensorflow does not free RAM. Workaround: Run prediction function (which instantiates a model) in sub-process.