import tensorflow as tf

  predict_input_fn = input_fn_builder(
      features=features,
      seq_length=FLAGS.max_seq_length,
      max_predictions_per_seq=FLAGS.max_predictions_per_seq)

  result = estimator.predict(input_fn=predict_input_fn)
  output_predict_file = os.path.join(FLAGS.output_dir, FLAGS.input_file.split('.')[0] + ".json")
  parse_result(result, all_tokens, output_predict_file)

if __name__ == "__main__":
  tf.app.run()
