JAWCF commited on
Commit
3526fb1
·
1 Parent(s): b26b756

Update characters.py

Browse files
Files changed (1) hide show
  1. characters.py +4 -2
characters.py CHANGED
@@ -63,8 +63,10 @@ class Characters(datasets.GeneratorBasedBuilder):
63
 
64
  def _generate_examples(self, images):
65
  """Yields examples."""
 
66
  for filepath, image in images:
67
- yield {
68
  "image": {"path": filepath, "bytes": image.read()},
69
  "text" : filepath,
70
- }
 
 
63
 
64
  def _generate_examples(self, images):
65
  """Yields examples."""
66
+ idx = 0
67
  for filepath, image in images:
68
+ yield idx, {
69
  "image": {"path": filepath, "bytes": image.read()},
70
  "text" : filepath,
71
+ }
72
+ idx+=1