noct-q-studio / deploy.py
acloudguy's picture
Add Noct Q V4 Gradio demo with ZeroGPU
edde0c0 verified
Raw History Blame Contribute Delete
973 Bytes
"""Publish this folder to a new, free ZeroGPU Space after HF login."""
from pathlib import Path
import argparse
from huggingface_hub import HfApi
def main() -> None:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--name", default="noct-q-studio")
args = parser.parse_args()
api = HfApi()
account = api.whoami()
repo = f"{account['name']}/{args.name}"
# Creation is intentionally not exist_ok: avoid replacing existing work.
api.create_repo(repo_id=repo, repo_type="space", space_sdk="gradio",
space_hardware="zero-a10g", private=False)
api.upload_folder(repo_id=repo, repo_type="space",
folder_path=str(Path(__file__).resolve().parent),
ignore_patterns=["__pycache__/*", "*.pyc", "ComfyUI/*", ".git/*"],
commit_message="Add Noct Q V4 Gradio demo with ZeroGPU")
print(f"Published: https://huggingface.co/spaces/{repo}")
if __name__ == "__main__":
main()