(eval_time_elapsed, prediction, nbest_json)
| 181 | return eval_time_elapsed, prediction, nbest_json |
| 182 | |
| 183 | def print_single_query(eval_time_elapsed, prediction, nbest_json): |
| 184 | print("------------------------") |
| 185 | print("Running inference in {:.3f} Sentences/Sec".format(1.0/eval_time_elapsed)) |
| 186 | print("------------------------") |
| 187 | |
| 188 | print("Answer: '{}'".format(prediction)) |
| 189 | print("With probability: {:.3f}".format(nbest_json[0]['probability'] * 100.0)) |
| 190 | |
| 191 | if squad_examples: |
| 192 | all_predictions = collections.OrderedDict() |