from tensorflow.contrib.util import make_tensor_proto

# Set request objects using the tf-serving `CopyFrom` setter method
request.model_spec.name = '0'
request.model_spec.signature_name = 'serving_default'
# This is correct (default constant).
request.inputs['input'].CopyFrom(make_tensor_proto(input_data,
                                                   shape=input_data.shape))

# Boiler-Plate
