Datasets:
pain
/

Modalities:
Image
Languages:
Arabic
Size:
n<1K
ArXiv:
Tags:
License:
pain commited on
Commit
9f75b8a
1 Parent(s): 161b4e2

Update AASL.py

Browse files
Files changed (1) hide show
  1. AASL.py +3 -2
AASL.py CHANGED
@@ -39,7 +39,7 @@ class AASL(datasets.GeneratorBasedBuilder):
39
 
40
  {
41
  "image": datasets.Image(),
42
- "label": datasets.features.ClassLabel(names=['Ain','Al','Alef','Beh','Dad','Dal','Feh','Ghain','Hah','Heh','Jeem','Kaf','Khah','Laa','Lam','Meem','Noon','Qaf','Reh','Sad','Seen','Sheen','Tah','Teh','Teh_Marbuta','Theh','Waw','Yeh','Zah','Zain'])
43
  }
44
  ),
45
  supervised_keys=("image", "label"),
@@ -72,9 +72,10 @@ class AASL(datasets.GeneratorBasedBuilder):
72
  for i, file in enumerate(images):
73
  if os.path.basename(file).endswith(".jpg"):
74
  # print(os.path.basename(os.path.dirname(file)).lower())
 
75
  with open(file, "rb") as f:
76
  yield str(i), {
77
  "image": file,
78
- "labels": 'test',
79
  }
80
 
 
39
 
40
  {
41
  "image": datasets.Image(),
42
+ "label": datasets.features.ClassLabel(names=['Ain','Al','Alef','Beh','Dad','Dal','Feh','Ghain','Hah','Heh','Jeem','Kaf','Khah','Laa','Lam','Meem','Noon','Qaf','Reh','Sad','Seen','Sheen','Tah','Teh','Teh_Marbuta','Theh','Waw','Yeh','Zah','Zain', 'thal'])
43
  }
44
  ),
45
  supervised_keys=("image", "label"),
 
72
  for i, file in enumerate(images):
73
  if os.path.basename(file).endswith(".jpg"):
74
  # print(os.path.basename(os.path.dirname(file)).lower())
75
+ print(os.path.basename(file).split('.')[0].split('_')[0])
76
  with open(file, "rb") as f:
77
  yield str(i), {
78
  "image": file,
79
+ "label": os.path.basename(file).split('.')[0].split('_')[0],
80
  }
81