Skip to content

Commit

Permalink
Fix download embedding script
Browse files Browse the repository at this point in the history
  • Loading branch information
constantinpape committed Oct 18, 2024
1 parent 1f5e361 commit a9aa376
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion workshops/i2k_2024/download_embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ def _download_embeddings(embedding_dir, dataset_name):

# Download the precomputed embeddings as zipfiles and unzip the embeddings per model.
for url, checksum in zip(urls, checksums):
if all([p.startswith("vit_b") for p in os.listdir(data_embedding_dir)]):
fnames = os.listdir(data_embedding_dir)
if fnames and all([p.startswith("vit_b") for p in fnames]):
continue

zip_path = os.path.join(data_embedding_dir, "embeddings.zip")
Expand Down

0 comments on commit a9aa376

Please sign in to comment.