PicFinder / setup.py
osanchik's picture
Update setup.py
422ac71
raw
history blame
1.03 kB
from huggingface_hub import hf_hub_url, cached_download
from huggingface_hub.archive import unpack_archive
def downlad_images() :
img_dir = 'flickr'
if not os.path.exists(img_dir) :
st.write("NEEED to download")
# os.makedirs(sample_dir, exist_ok=True)
# # Specify the Google Drive link to the archive file
# archive_url = 'https://drive.google.com/uc?id=14QhofCbby053kWbVeWEBHCxOROQS-bjN'
# # Specify the destination directory within the Hugging Face space
# destination_dir = 'osanchik/flickr'
# # Replace with your desired destination directory
# # Construct the destination path
# destination_path = hf_hub_url(destination_dir)
# # Download the archive to the destination path
# cached_download(archive_url, destination_path)
# # Unpack the archive
# unpack_archive(destination_path, destination_dir)
# print(f"Archive unpacked to: {destination_dir}")
return