(eval_time_elapsed, prediction, nbest_json)
| 221 | return eval_time_elapsed, prediction, nbest_json |
| 222 | |
| 223 | def print_single_query(eval_time_elapsed, prediction, nbest_json): |
| 224 | print("------------------------") |
| 225 | print("Running inference in {:.3f} Sentences/Sec".format(args.batch_size/eval_time_elapsed)) |
| 226 | print("------------------------") |
| 227 | |
| 228 | print("Answer: '{}'".format(prediction)) |
| 229 | print("With probability: {:.3f}".format(nbest_json[0]['probability'] * 100.0)) |
| 230 | |
| 231 | if squad_examples: |
| 232 | all_predictions = collections.OrderedDict() |