import os from huggingface_hub import HfApi api = HfApi(token=os.environ["sc4sc_token"]) # Step 1: Explicitly create the Space with SDK = "docker" api.create_repo( repo_id="sc4sc/editor", # Your org/username and repo name repo_type="space", space_sdk="docker", private=False, # Set to True if you want it private exist_ok=True # Avoid error if it already exists ) # Step 2: Upload the contents api.upload_large_folder( folder_path=".", repo_id="sc4sc/editor", repo_type="space", allow_patterns="**/*" ) print("✅ Large folder upload completed successfully.")