File size: 1,012 Bytes
3a3bb19 63d858e 55315c3 422ac71 55315c3 422ac71 ec9fcfe 422ac71 55315c3 ec9fcfe |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
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 |