def output_fn()

in models/model-a/src/code/inference.py [0:0]


def output_fn(predicted_label, accept=_content_type_json):
    logger.info('output_fn: Serializing the generated output.')

    if accept == _content_type_json:
        response = {
            'success': 'true',
            'label': predicted_label
        }
        return json.dumps(response), accept
    
    raise Exception('output_fn: Requested unsupported ContentType in Accept: ' + accept)