Upload dave.py with huggingface_hub
Browse files
dave.py
CHANGED
@@ -99,6 +99,11 @@ class DaveDataset(datasets.GeneratorBasedBuilder):
|
|
99 |
|
100 |
for idx, item in enumerate(data):
|
101 |
|
|
|
|
|
|
|
|
|
|
|
102 |
for field in _MEDIA_FIELDS:
|
103 |
if "P02" not in item[field]:
|
104 |
continue
|
@@ -106,6 +111,7 @@ class DaveDataset(datasets.GeneratorBasedBuilder):
|
|
106 |
continue
|
107 |
if item[field] not in downloaded_files:
|
108 |
continue
|
|
|
109 |
item[field] = downloaded_files[item[field]]
|
110 |
|
111 |
yield idx, item
|
|
|
99 |
|
100 |
for idx, item in enumerate(data):
|
101 |
|
102 |
+
print(len(downloaded_files))
|
103 |
+
for f in downloaded_files.keys():
|
104 |
+
if "P02" in f:
|
105 |
+
print(f, downloaded_files[f])
|
106 |
+
|
107 |
for field in _MEDIA_FIELDS:
|
108 |
if "P02" not in item[field]:
|
109 |
continue
|
|
|
111 |
continue
|
112 |
if item[field] not in downloaded_files:
|
113 |
continue
|
114 |
+
|
115 |
item[field] = downloaded_files[item[field]]
|
116 |
|
117 |
yield idx, item
|