BackdoorChecker / scripts /publish.py
coralexbadea's picture
Backdoor Checker v0.1.0: scanner, validation results, leaderboard
b112551 verified
Raw History Blame Contribute Delete
703 Bytes
"""Publish this folder as a static Hugging Face Space (free tier: no build, no server)."""
import os
import sys
from huggingface_hub import HfApi
ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SPACE = sys.argv[1] if len(sys.argv) > 1 else "coralexbadea/BackdoorChecker"
api = HfApi()
api.create_repo(SPACE, repo_type="space", space_sdk="static", exist_ok=True)
api.upload_folder(
repo_id=SPACE, repo_type="space", folder_path=ROOT,
ignore_patterns=["calibration/logs/*", "calibration/cards/*", "**/__pycache__/*", "*.pyc", ".git/*"],
commit_message="Backdoor Checker v0.1.0: scanner, validation results, leaderboard",
)
print(f"https://huggingface.co/spaces/{SPACE}")