Skip to content

Commit b37317e

Browse files
Fix logic of utils.download_model.
1 parent 680698a commit b37317e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fire_classifier/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ def download_model(url, file_paths, file_sha256=None):
4545
"""
4646
# Download only the model files that are needed
4747
for model_file_path in file_paths:
48-
is_secure = get_hash(model_file_path) == file_sha256
49-
if os.path.exists(model_file_path) and is_secure:
50-
print(f"File already exists: {model_file_path}")
48+
if os.path.exists(model_file_path):
49+
if get_hash(model_file_path) == file_sha256:
50+
print(f"File already exists: {model_file_path}")
5151
else: # need to download the model
5252
model_file_url = f"{url}/{model_file_path}"
5353
keras.utils.get_file(

0 commit comments

Comments
 (0)