from huggingface_hub import HfApi, RepoUrl def launch_substra_space(hf_api: HfApi, repo_id: str) -> RepoUrl: repo_url = hf_api.create_repo( repo_id=repo_id, repo_type="space", space_sdk="docker" ) hf_api.upload_folder( repo_id=repo_id, repo_type="space", folder_path="substra_template/" ) return repo_url