Skip to content

Commit f5f1e12

Browse files
author
Alexander Gorban
committed
[Attention OCR]: Address review comment.
Use temp variable for predictions.
1 parent 89e19ed commit f5f1e12

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

research/attention_ocr/python/demo_inference.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,9 @@ def run(checkpoint, batch_size, dataset_name, image_path_pattern):
8686

8787
def main(_):
8888
print("Predicted strings:")
89-
for line in run(FLAGS.checkpoint, FLAGS.batch_size, FLAGS.dataset_name,
90-
FLAGS.image_path_pattern):
89+
predictions = run(FLAGS.checkpoint, FLAGS.batch_size, FLAGS.dataset_name,
90+
FLAGS.image_path_pattern)
91+
for line in predictions:
9192
print(line)
9293

9394

0 commit comments

Comments
 (0)