Handle unexpected errors in the web service, for example if given an invalid or corrupt image file.
Do batch prediction inside the `predict` method instead of calling `predict` once for each image.