denoise-app / space_app.py
katospiegel's picture
Deploy denoise-app as an imaging-plaza Gradio Space (SDSC)
753375e verified
Raw
History Blame Contribute Delete
635 Bytes
"""Hugging Face Space entrypoint (Gradio SDK).
A Gradio SDK Space has no Docker build step, so the synthetic example that the
Dockerfile bakes via `python -m scripts.make_example` is generated here at startup
instead. Then app.py is run unchanged, exactly as `python app.py`, so every contract
surface (/process, ?file_url=, MCP, cleanup) is untouched.
"""
from __future__ import annotations
import runpy
try:
from scripts.make_example import main as _make_example
_make_example()
except Exception as exc: # noqa: BLE001
print(f"[space_app] example bake skipped: {exc}")
runpy.run_path("app.py", run_name="__main__")