def setup_dataset_on_hub()

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


def setup_dataset_on_hub(repo_id, hub_token):
    # create an empty dataset repo on the hub
    hf_api.create_repo(
        repo_id=repo_id,
        token=hub_token,
        repo_type="dataset",
    )

    # upload the seed data
    hf_api.upload_file(
        path_or_fileobj="seed_data.json",
        path_in_repo="seed_data.json",
        repo_id=repo_id,
        repo_type="dataset",
        token=hub_token,
    )