Serve tensorflow iris models

Export a model

    # Feature columns describe how to use the input.
    my_feature_columns = []
    for key in train_x.keys():
        my_feature_columns.append(tf.feature_column.numeric_column(key=key))

    feature_spec = tf.feature_column.make_parse_example_spec(my_feature_columns)
    serving_input_receiver_fn = tf.estimator.export.build_parsing_serving_input_receiver_fn(feature_spec)
    export_dir = classifier.export_savedmodel('export', serving_input_receiver_fn)

or

def serving_input_receiver_fn():
  max_seq_length = FLAGS.max_seq_length
  batch_size = 1
  feature_spec = {
  "unique_ids …
more ...