wing / upload.py
Jam1e3's picture
Mirror WING project page
0d64a56 verified
Raw History Blame Contribute Delete
626 Bytes
"""Upload the already-created static Space without the CLI's Gradio fallback."""
from pathlib import Path
from huggingface_hub import HfApi
REPO_ID = "Jam1e3/wing"
SPACE_DIR = Path(__file__).resolve().parent
def main() -> None:
api = HfApi()
commit = api.upload_folder(
repo_id=REPO_ID,
repo_type="space",
folder_path=SPACE_DIR,
commit_message="Mirror WING project page",
delete_patterns=["media/*", "style.css"],
)
print(f"Uploaded commit: {commit.commit_url}")
print(f"Space: https://huggingface.co/spaces/{REPO_ID}")
if __name__ == "__main__":
main()