Spaces:
Paused
Paused
Commit ·
8ed74e6
1
Parent(s): 547f906
Deploy QueryLens (Gradio-SDK launcher: worker :8700 / MCP :8701 / web :7860)
Browse files
app.py
CHANGED
|
@@ -72,7 +72,13 @@ except Exception:
|
|
| 72 |
traceback.print_exc()
|
| 73 |
|
| 74 |
if spaces is not None:
|
| 75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
import subprocess
|
| 78 |
from pathlib import Path
|
|
@@ -110,7 +116,7 @@ _mcp = _spawn("Agent.mcp_server:app", 8701, "MCP tool server")
|
|
| 110 |
import gradio as gr # noqa: E402 (after 'spaces' — ZeroGPU rule 1)
|
| 111 |
from web.app import app as fastapi_app # noqa: E402
|
| 112 |
|
| 113 |
-
_ZERO_GPU = bool(spaces is not None and getattr(spaces.config, "zero_gpu", False))
|
| 114 |
print(f"[LAUNCHER] ZeroGPU branch = {_ZERO_GPU}", flush=True)
|
| 115 |
|
| 116 |
if spaces is not None:
|
|
|
|
| 72 |
traceback.print_exc()
|
| 73 |
|
| 74 |
if spaces is not None:
|
| 75 |
+
# NB: spaces.config is a MODULE; the Settings instance is spaces.config.Config.
|
| 76 |
+
_zero_settings = getattr(spaces.config, "Config", None)
|
| 77 |
+
print(
|
| 78 |
+
f"[LAUNCHER] spaces zero_gpu = {getattr(_zero_settings, 'zero_gpu', None)}, "
|
| 79 |
+
f"device_api = {getattr(_zero_settings, 'zero_device_api_url', None)!r}",
|
| 80 |
+
flush=True,
|
| 81 |
+
)
|
| 82 |
|
| 83 |
import subprocess
|
| 84 |
from pathlib import Path
|
|
|
|
| 116 |
import gradio as gr # noqa: E402 (after 'spaces' — ZeroGPU rule 1)
|
| 117 |
from web.app import app as fastapi_app # noqa: E402
|
| 118 |
|
| 119 |
+
_ZERO_GPU = bool(spaces is not None and getattr(getattr(spaces.config, "Config", None), "zero_gpu", False))
|
| 120 |
print(f"[LAUNCHER] ZeroGPU branch = {_ZERO_GPU}", flush=True)
|
| 121 |
|
| 122 |
if spaces is not None:
|