import json


def output_fn(predictions, content_type):
    """Post-process and serialize model output to API response"""
    print('result:', predictions)
    res = predictions.cpu().numpy().tolist()
    return json.dumps(res)