AnaChikashua commited on
Commit
bd9a7b2
1 Parent(s): 32bde1d

Update handwriting_dataset.py

Browse files
Files changed (1) hide show
  1. handwriting_dataset.py +2 -2
handwriting_dataset.py CHANGED
@@ -22,7 +22,7 @@ class HandwritingData(datasets.GeneratorBasedBuilder):
22
  citation=_CITATION,
23
  features=datasets.Features(
24
  {"text": datasets.Value("string"),
25
- "char": datasets.Value('string'),
26
  "image": datasets.Image()
27
  }
28
  ),
@@ -48,6 +48,6 @@ class HandwritingData(datasets.GeneratorBasedBuilder):
48
  text = [c for c in filepath if not 0 <= ord(c) <= 127][0]
49
  yield idx, {
50
  "text": text,
51
- "char": text,
52
  "image": {"path": filepath, "bytes": image.read()}
53
  }
 
22
  citation=_CITATION,
23
  features=datasets.Features(
24
  {"text": datasets.Value("string"),
25
+ "char": datasets.Value('int32'),
26
  "image": datasets.Image()
27
  }
28
  ),
 
48
  text = [c for c in filepath if not 0 <= ord(c) <= 127][0]
49
  yield idx, {
50
  "text": text,
51
+ "char": idx,
52
  "image": {"path": filepath, "bytes": image.read()}
53
  }