import os | |
import streamlit as st | |
# 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) : | |
# os.makedirs(img_dir) | |
# # 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 |