Update soybean_dataset.py
Browse files- soybean_dataset.py +10 -1
soybean_dataset.py
CHANGED
|
@@ -128,8 +128,17 @@ class SoybeanDataset(datasets.GeneratorBasedBuilder):
|
|
| 128 |
|
| 129 |
def _generate_examples(self, filepath):
|
| 130 |
logging.info("Generating examples from = %s", filepath)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
|
| 132 |
-
|
|
|
|
|
|
|
| 133 |
|
| 134 |
for filename in os.listdir(filepath):
|
| 135 |
if filename.endswith('_original.jpg'):
|
|
|
|
| 128 |
|
| 129 |
def _generate_examples(self, filepath):
|
| 130 |
logging.info("Generating examples from = %s", filepath)
|
| 131 |
+
|
| 132 |
+
print(f"Debug: filepath = {filepath}")
|
| 133 |
+
|
| 134 |
+
# Check if the directory exists
|
| 135 |
+
if not os.path.exists(filepath):
|
| 136 |
+
print(f"Debug: Directory does not exist: {filepath}")
|
| 137 |
+
return
|
| 138 |
|
| 139 |
+
file_list = os.listdir(filepath)
|
| 140 |
+
print(f"Debug: file_list = {file_list}")
|
| 141 |
+
|
| 142 |
|
| 143 |
for filename in os.listdir(filepath):
|
| 144 |
if filename.endswith('_original.jpg'):
|