Update test.py
Browse files
test.py
CHANGED
|
@@ -597,7 +597,7 @@ class Food500(datasets.GeneratorBasedBuilder):
|
|
| 597 |
|
| 598 |
def _generate_examples(self, images, metadata_set):
|
| 599 |
"""Generate images and labels for splits."""
|
| 600 |
-
metadata_set = {
|
| 601 |
for file_path, file_obj in images:
|
| 602 |
if file_path.startswith(_IMAGES_DIR):
|
| 603 |
if file_path[len(_IMAGES_DIR) : -len(".jpg")] in metadata_set:
|
|
|
|
| 597 |
|
| 598 |
def _generate_examples(self, images, metadata_set):
|
| 599 |
"""Generate images and labels for splits."""
|
| 600 |
+
metadata_set = {path.encode("utf-8") for path in metadata_set}
|
| 601 |
for file_path, file_obj in images:
|
| 602 |
if file_path.startswith(_IMAGES_DIR):
|
| 603 |
if file_path[len(_IMAGES_DIR) : -len(".jpg")] in metadata_set:
|