def pull_seed_data_from_repo()

in cookbook-efforts/domain-specific-datasets/parent_app/hub.py [0:0]


def pull_seed_data_from_repo(repo_id, hub_token):
    tempfile_path = mktemp()
    # pull the dataset repo from the hub
    hf_api.hf_hub_download(
        repo_id=repo_id, token=hub_token, repo_type="dataset", filename=tempfile_path
    )
    return json.load(open(tempfile_path))