Update script.py
Browse files
script.py
CHANGED
|
@@ -25,7 +25,7 @@ def predict(test_metadata, root_path='/tmp/data/private_testset', output_csv_pat
|
|
| 25 |
print(os.path.abspath(os.path.dirname(__file__)))
|
| 26 |
for img_name in img_name_list:
|
| 27 |
img_path = os.path.join(root_path, img_name)
|
| 28 |
-
|
| 29 |
img = Image.open(img_path)
|
| 30 |
img = data_transform(img)
|
| 31 |
img_list.append(img)
|
|
|
|
| 25 |
print(os.path.abspath(os.path.dirname(__file__)))
|
| 26 |
for img_name in img_name_list:
|
| 27 |
img_path = os.path.join(root_path, img_name)
|
| 28 |
+
assert os.path.exists(img_path), "file: '{}' dose not exist.".format(img_path)
|
| 29 |
img = Image.open(img_path)
|
| 30 |
img = data_transform(img)
|
| 31 |
img_list.append(img)
|