Spaces:
Running on Zero
Running on Zero
Download deploy.py from acloudguy/noct-q-studio: direct link, hf CLI and curl.
- Browser
- Download file 973 Bytes
-
https://huggingface.co/spaces/acloudguy/noct-q-studio/resolve/main/deploy.py
- Command line
-
hf download hf://spaces/acloudguy/noct-q-studio/deploy.py
-
curl -L -o deploy.py https://huggingface.co/spaces/acloudguy/noct-q-studio/resolve/main/deploy.py
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() | |