splice-benchmark / upload_splice_hf.py
prokajevo's picture
Add files using upload-large-folder tool
a1d4687 verified
raw
history blame contribute delete
839 Bytes
import os
from huggingface_hub import HfApi, create_repo
LOCAL_DATA_PATH = "."
REPO_ID = "prokajevo/splice-benchmark"
def upload_splice_robustly():
print(f"Starting robust upload for repository: {REPO_ID}")
api = HfApi()
print(f"Ensuring repository '{REPO_ID}' exists...")
create_repo(
repo_id=REPO_ID,
repo_type="dataset",
exist_ok=True,
)
print("Repository exists.")
print(f"Starting parallel upload of folder '{os.path.abspath(LOCAL_DATA_PATH)}'...")
api.upload_large_folder(
folder_path=LOCAL_DATA_PATH,
repo_id=REPO_ID,
repo_type="dataset"
)
print("\n--- Parallel Upload Complete! ---")
print(f"Visit your dataset at: https://huggingface.co/datasets/{REPO_ID}")
if __name__ == "__main__":
upload_splice_robustly()