from huggingface_hub import HfApi # Create an API instance api = HfApi() # Start uploading the folder in the background (non-blocking) future = api.upload_large_folder( repo_id="kalhar/images_dataset", # Your repo ID folder_path="C:/Users/kalha/Documents/NEU 5330/Lab 1/computer-vision-dataset/image_dataset", # Local folder to upload repo_type="dataset", # Specify it's a dataset repo (if needed) ) print("Upload started. Waiting for completion...") # Optionally, you can check if the future is done print("Upload done?", future.done()) # Block until the upload completes and get the result result = future.result() print("Folder uploaded successfully!")