Skip to content

Commit 4b8c07a

Browse files
committed
check for existing files
1 parent defb618 commit 4b8c07a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fastembed/common/model_management.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def retrieve_model_gcs(cls, model_name: str, source_url: str, cache_dir: str) ->
131131
model_tmp_dir = cache_tmp_dir / fast_model_name
132132
model_dir = Path(cache_dir) / fast_model_name
133133

134-
if model_dir.exists():
134+
if model_dir.exists() and len(list(model_dir.glob("*"))) > 0:
135135
return model_dir
136136

137137
if model_tmp_dir.exists():

0 commit comments

Comments
 (0)