import os from huggingface_hub import upload_file repo_id = "JustDelet/R3GEN-COCO" local_folder = "/home2/zbz5349/aigeeks/RL" for file_name in os.listdir(local_folder): file_path = os.path.join(local_folder, file_name) if os.path.isfile(file_path): upload_file( path_or_fileobj=file_path, path_in_repo=file_name, repo_id=repo_id, repo_type="dataset" )