def __init__(self, config):
This method is required. It is called once before the API
becomes available. It performs the setup such as downloading /
:param config (required): Dictionary passed from API configuration.
def predict(self, payload):
This method is required. It is called once per request.
Preprocesses the request payload runs inference, and
post-processes the inference output.
:param payload (optional): The request payload
:returns : Prediction or a batch of predictions.
response = model(payload["url"])