deploy: update habadashi_login
Browse files
app.py
CHANGED
|
@@ -318,6 +318,13 @@ if private_app_dir:
|
|
| 318 |
# ---------------------------------------------------------
|
| 319 |
|
| 320 |
ver20_app = ver20_blocks
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 321 |
print(f"[PHASE] import_ver20_end success=true type={type(ver20_app)}")
|
| 322 |
except Exception as e:
|
| 323 |
print(f"[PHASE] import_ver20_end success=false")
|
|
@@ -325,6 +332,7 @@ if private_app_dir:
|
|
| 325 |
print(f"[TRACEBACK]\n{traceback.format_exc()}")
|
| 326 |
else:
|
| 327 |
print(f"[PHASE] import_ver20_end success=false reason=bootstrap_failed")
|
|
|
|
| 328 |
|
| 329 |
# --- Routes ---
|
| 330 |
@app.get("/")
|
|
@@ -379,7 +387,12 @@ print("[PHASE] mount_login_end path=/login")
|
|
| 379 |
# Ver20 App (protected)
|
| 380 |
print("[PHASE] mount_app_start")
|
| 381 |
if ver20_app:
|
| 382 |
-
app = gr.mount_gradio_app(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 383 |
print("[PHASE] mount_app_end path=/app protected=true ver20=true")
|
| 384 |
else:
|
| 385 |
# Fallback: simple placeholder if ver20 failed to load
|
|
|
|
| 318 |
# ---------------------------------------------------------
|
| 319 |
|
| 320 |
ver20_app = ver20_blocks
|
| 321 |
+
|
| 322 |
+
# theme/css を mount_gradio_app に渡すために ver20 の定数を取得
|
| 323 |
+
try:
|
| 324 |
+
from app import CUSTOM_CSS as VER20_CSS
|
| 325 |
+
except ImportError:
|
| 326 |
+
VER20_CSS = None
|
| 327 |
+
|
| 328 |
print(f"[PHASE] import_ver20_end success=true type={type(ver20_app)}")
|
| 329 |
except Exception as e:
|
| 330 |
print(f"[PHASE] import_ver20_end success=false")
|
|
|
|
| 332 |
print(f"[TRACEBACK]\n{traceback.format_exc()}")
|
| 333 |
else:
|
| 334 |
print(f"[PHASE] import_ver20_end success=false reason=bootstrap_failed")
|
| 335 |
+
VER20_CSS = None
|
| 336 |
|
| 337 |
# --- Routes ---
|
| 338 |
@app.get("/")
|
|
|
|
| 387 |
# Ver20 App (protected)
|
| 388 |
print("[PHASE] mount_app_start")
|
| 389 |
if ver20_app:
|
| 390 |
+
app = gr.mount_gradio_app(
|
| 391 |
+
app, ver20_app, path="/app",
|
| 392 |
+
auth_dependency=get_current_user,
|
| 393 |
+
theme=gr.themes.Citrus(),
|
| 394 |
+
css=VER20_CSS,
|
| 395 |
+
)
|
| 396 |
print("[PHASE] mount_app_end path=/app protected=true ver20=true")
|
| 397 |
else:
|
| 398 |
# Fallback: simple placeholder if ver20 failed to load
|