Datasets:
Tasks:
Image Classification
Modalities:
Image
Formats:
imagefolder
Languages:
Georgian
Size:
10K - 100K
Commit
·
48f0f22
1
Parent(s):
331df98
Update handwriting_dataset.py
Browse files- handwriting_dataset.py +1 -1
handwriting_dataset.py
CHANGED
@@ -44,7 +44,7 @@ class HandwritingData(datasets.GeneratorBasedBuilder):
|
|
44 |
# Iterate through images
|
45 |
for idx, filepath, image in enumerate(images):
|
46 |
# extract the text from the filename
|
47 |
-
text = filepath
|
48 |
yield idx, {
|
49 |
"text": text,
|
50 |
"image": {"path": filepath, "bytes": image.read()}
|
|
|
44 |
# Iterate through images
|
45 |
for idx, filepath, image in enumerate(images):
|
46 |
# extract the text from the filename
|
47 |
+
text = [c for c in filepath if not 0 <= ord(c) <= 127][0]
|
48 |
yield idx, {
|
49 |
"text": text,
|
50 |
"image": {"path": filepath, "bytes": image.read()}
|