Skip to content

Instantly share code, notes, and snippets.

@neonwatty
neonwatty / create_hf_dataset_sample.py
Created February 25, 2025 14:41
create sample of an hf dataset and push it to the hub
import sys
import os
import datasets
from huggingface_hub import HfApi, upload_file
def update_dataset_card(dataset_id: str, update: str, cache_dir="./dataset"):
# Authenticate
api = HfApi()