INNER CODE UNIT · Python
upload_assets
ultralytics/yolo-flutter-app · scripts/export-tflite-models.py:165
def upload_assets(repo: str, tag: str, assets: list[Path]) -> None:
"""Upload generated assets to a GitHub release."""
if not assets:
return
command = ["gh", "release", "upload", tag, "--repo", repo, "--clobber", *(str(path) for path in assets)]
subprocess.run(command, check=True)
def display_path(path: Path) -> str:
"""Return a repository-relative path when possible."""
try:
return str(path.relative_to(ROOT))
except ValueError:
return str(path)
def export_one(model_id: str, imgsz: int, output_dir: Path) -> None:
"""Export one YOLO model to w8a32 LiteRT (no calibration data required)."""