in inference/xgboost/inference.py [0:0]
def input_fn(input_data, content_type):
if content_type == content_types.JSON:
print("Recieved content type is json")
print("input_data is", input_data)
obj = json.loads(input_data)
print("obj", obj)
array = np.array(obj)
return xgb.DMatrix(array)
else:
print("content type is not json")
return xgb_encoders.decode(input_data, content_type)