"""Utility helpers for the Hugging Face Space deployment. Call these functions from ``app.py`` if you want extra setup beyond the basic snapshot download (for example copying files into specific folders). This file is optional; include or edit it as needed for your workflow. """ from __future__ import annotations import shutil from pathlib import Path def copy_if_missing(src: Path, dst: Path) -> None: """Copy ``src`` into ``dst`` if the destination path does not yet exist.""" if dst.exists(): return dst.parent.mkdir(parents=True, exist_ok=True) if src.is_dir(): shutil.copytree(src, dst) else: shutil.copy2(src, dst)