Spaces:
Running on Zero
Running on Zero
Tristan Leduc Claude Fable 5 commited on
Commit ·
bd037ff
1
Parent(s): 71d9edc
Import narrate.llm at startup so ZeroGPU detects the @spaces.GPU function
Browse files
app.py
CHANGED
|
@@ -21,6 +21,10 @@ sys.path.insert(0, str(Path(__file__).resolve().parent / "src"))
|
|
| 21 |
from fastapi.responses import HTMLResponse
|
| 22 |
from gradio import Server
|
| 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
from discoverroute.pipeline import plan_route
|
| 25 |
from discoverroute.ui import map as mapui
|
| 26 |
from discoverroute.ui import shell
|
|
|
|
| 21 |
from fastapi.responses import HTMLResponse
|
| 22 |
from gradio import Server
|
| 23 |
|
| 24 |
+
# ZeroGPU scans for @spaces.GPU functions AT STARTUP — import the module that
|
| 25 |
+
# defines one (cheap: model/torch loading stays lazy inside the function).
|
| 26 |
+
import discoverroute.narrate.llm # noqa: F401 (registers spaces.GPU)
|
| 27 |
+
|
| 28 |
from discoverroute.pipeline import plan_route
|
| 29 |
from discoverroute.ui import map as mapui
|
| 30 |
from discoverroute.ui import shell
|