def METHOD_NAME(app):
    @app.before_first_request
    def init_model() -> None:
        detector = managers.plugin_manager.detector
        face_plugins = managers.plugin_manager.face_plugins
        face_plugins = face_detection_skip_check(face_plugins)
        detector(
            img=read_img(str(IMG_DIR / 'einstein.jpeg')),
            det_prob_threshold=_get_det_prob_threshold(),
            face_plugins=face_plugins
        )
        print("Starting to load ML models")
        return None
    @app.route('/healthcheck')
    def healthcheck():
        return jsonify(
            status='OK'
        )
    @app.route('/status')
    def status_get():
        available_plugins = {p.slug: str(p)
                             for p in managers.plugin_manager.plugins}
        calculator = managers.plugin_manager.calculator
        return jsonify(
            status='OK', build_version=ENV.BUILD_VERSION,
            calculator_version=str(calculator),
            similarity_coefficients=calculator.ml_model.similarity_coefficients,
            available_plugins=available_plugins
        )
    @app.route('/find_faces_base64', methods=['POST'])
    def find_faces_base64_post():
        detector = managers.plugin_manager.detector
        face_plugins = managers.plugin_manager.filter_face_plugins(
            _get_face_plugin_names()
        )
        face_plugins = face_detection_skip_check(face_plugins)
        rawfile = base64.b64decode(request.get_json()["file"])
        faces = detector(
            img=read_img(rawfile),
            det_prob_threshold=_get_det_prob_threshold(),
            face_plugins=face_plugins
        )
        plugins_versions = {p.slug: str(p) for p in [detector] + face_plugins}
        faces = _limit(faces, request.values.get(ARG.LIMIT))
        FaceDetection.SKIPPING_FACE_DETECTION = False
        return jsonify(plugins_versions=plugins_versions, result=faces)
    @app.route('/find_faces', methods=['POST'])
    @needs_attached_file
    def find_faces_post():
        detector = managers.plugin_manager.detector
        face_plugins = managers.plugin_manager.filter_face_plugins(
            _get_face_plugin_names()
        )
        face_plugins = face_detection_skip_check(face_plugins)
        faces = detector(
            img=read_img(request.files['file']),
            det_prob_threshold=_get_det_prob_threshold(),
            face_plugins=face_plugins
        )
        plugins_versions = {p.slug: str(p) for p in [detector] + face_plugins}
        faces = _limit(faces, request.values.get(ARG.LIMIT))
        FaceDetection.SKIPPING_FACE_DETECTION = False
        return jsonify(plugins_versions=plugins_versions, result=faces)
    @app.route('/scan_faces', methods=['POST'])
    @needs_attached_file
    def scan_faces_post():
        faces = scanner.scan(
            img=read_img(request.files['file']),
            det_prob_threshold=_get_det_prob_threshold()
        )
        faces = _limit(faces, request.values.get(ARG.LIMIT))
        return jsonify(calculator_version=scanner.ID, result=faces)