Update AASL.py
Browse files
AASL.py
CHANGED
@@ -69,9 +69,11 @@ class AASL(datasets.GeneratorBasedBuilder):
|
|
69 |
print(x)
|
70 |
print(images)
|
71 |
|
72 |
-
for
|
73 |
-
if
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
|
|
|
|
|
69 |
print(x)
|
70 |
print(images)
|
71 |
|
72 |
+
for i, file in enumerate(file):
|
73 |
+
if os.path.basename(file).endswith(".jpg"):
|
74 |
+
with open(file, "rb") as f:
|
75 |
+
yield str(i), {
|
76 |
+
"image": file,
|
77 |
+
"labels": os.path.basename(os.path.dirname(file)).lower(),
|
78 |
+
}
|
79 |
+
|