import tensorflow as tf


  if FLAGS.do_serve:

    def serving_input_fn():
      with tf.variable_scope("foo"):
        feature_spec = {
            "input_ids": tf.FixedLenFeature([FLAGS.max_seq_length], tf.int64),
            "input_mask": tf.FixedLenFeature([FLAGS.max_seq_length], tf.int64),
