def ping()

in source/containers/face-comparison/recognizer/predictor.py [0:0]


def ping():
    """
    Determine if the container is working and healthy. In this sample container, we declare
    it healthy if we can load the model successfully.

    :return:
    """
    detector_mode, embedding_model = FaceRecognizerService.get_model()
    health = (detector_mode is not None) and (embedding_model is not None)
    status = 200 if health else 404
    return flask.Response(response='\n', status=status, mimetype='application/json')