File size: 842 Bytes
5ba1bb4 7752b17 5ba1bb4 7752b17 5ba1bb4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | """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)")
|