Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,15 +1,20 @@
|
|
| 1 |
|
| 2 |
-
# ---------- MUST BE FIRST: Gradio CDN + ZeroGPU probe ----------
|
| 3 |
import os
|
| 4 |
os.environ.setdefault("GRADIO_USE_CDN", "true")
|
| 5 |
|
| 6 |
import spaces
|
| 7 |
|
| 8 |
@spaces.GPU(duration=10)
|
| 9 |
-
def
|
| 10 |
# Never called; exists so ZeroGPU startup check passes.
|
| 11 |
return a + b
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
# ---------- Standard imports ----------
|
| 14 |
from pathlib import Path
|
| 15 |
from typing import Optional, Tuple, List
|
|
|
|
| 1 |
|
|
|
|
| 2 |
import os
|
| 3 |
os.environ.setdefault("GRADIO_USE_CDN", "true")
|
| 4 |
|
| 5 |
import spaces
|
| 6 |
|
| 7 |
@spaces.GPU(duration=10)
|
| 8 |
+
def gpu_probe(a: int = 1, b: int = 1) -> int:
|
| 9 |
# Never called; exists so ZeroGPU startup check passes.
|
| 10 |
return a + b
|
| 11 |
|
| 12 |
+
|
| 13 |
+
@spaces.GPU(duration=10)
|
| 14 |
+
def gpu_echo(x: str = "ok") -> str:
|
| 15 |
+
return x
|
| 16 |
+
|
| 17 |
+
|
| 18 |
# ---------- Standard imports ----------
|
| 19 |
from pathlib import Path
|
| 20 |
from typing import Optional, Tuple, List
|