AnaChikashua commited on
Commit
d8e92fd
1 Parent(s): bd9a7b2

Update handwriting_dataset.py

Browse files
Files changed (1) hide show
  1. handwriting_dataset.py +6 -6
handwriting_dataset.py CHANGED
@@ -4,9 +4,9 @@ logger = datasets.logging.get_logger(__name__)
4
 
5
  _CITATION = """\
6
  @InProceedings{huggingface:dataset,
7
- title = {Small image-text set},
8
- author={James Briggs},
9
- year={2022}
10
  }
11
  """
12
  _DESCRIPTION = """
@@ -22,7 +22,7 @@ class HandwritingData(datasets.GeneratorBasedBuilder):
22
  citation=_CITATION,
23
  features=datasets.Features(
24
  {"text": datasets.Value("string"),
25
- "char": datasets.Value('int32'),
26
  "image": datasets.Image()
27
  }
28
  ),
@@ -47,7 +47,7 @@ class HandwritingData(datasets.GeneratorBasedBuilder):
47
  # extract the text from the filename
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
  }
 
4
 
5
  _CITATION = """\
6
  @InProceedings{huggingface:dataset,
7
+ title = {Georgian language alphabet dataset},
8
+ author={Ana Chikashua},
9
+ year={2023}
10
  }
11
  """
12
  _DESCRIPTION = """
 
22
  citation=_CITATION,
23
  features=datasets.Features(
24
  {"text": datasets.Value("string"),
25
+ "char": datasets.Value("string"),
26
  "image": datasets.Image()
27
  }
28
  ),
 
47
  # extract the text from the filename
48
  text = [c for c in filepath if not 0 <= ord(c) <= 127][0]
49
  yield idx, {
50
+ "text": str(text),
51
+ "char": str(idx),
52
  "image": {"path": filepath, "bytes": image.read()}
53
  }