Download chatcode/package.py from gamedevelop/pocketvision-chat-code: direct link, hf CLI and curl.
- Browser
- Download file 842 Bytes
-
https://huggingface.co/gamedevelop/pocketvision-chat-code/resolve/main/chatcode/package.py
- Command line
-
hf download hf://gamedevelop/pocketvision-chat-code/chatcode/package.py
-
curl -L -o package.py https://huggingface.co/gamedevelop/pocketvision-chat-code/resolve/main/chatcode/package.py
842 Bytes
| """Package only source and configuration; no credentials, data, or old weights.""" | |
| from pathlib import Path | |
| import zipfile | |
| ROOT = Path(__file__).resolve().parent.parent | |
| if __name__ == "__main__": | |
| files = [ROOT / name for name in ["app.py", "chat.py", "LICENSE", "LICENSE-BASE-MODEL.txt"]] | |
| files += [p for p in (ROOT / "chatcode").iterdir() | |
| if p.is_file() and p.suffix in {".py", ".json", ".md", ".txt", ".ipynb"}] | |
| (ROOT / "dist").mkdir(exist_ok=True) | |
| destination = ROOT / "dist/pocketvision-chat-code-writing-source.zip" | |
| with zipfile.ZipFile(destination, "w", compression=zipfile.ZIP_DEFLATED) as bundle: | |
| for path in sorted(files): | |
| bundle.write(path, path.relative_to(ROOT).as_posix()) | |
| print(f"Created {destination} ({destination.stat().st_size:,} bytes; source only, untrained)") | |