Spaces:
Sleeping
Sleeping
Log whether HF_TOKEN is present at startup (boolean only)
Browse filesPrints '[inside-out] startup: HF_TOKEN present: True/False | model: ...'
at import time so the Space logs confirm whether the secret reached the
running app. Never logs the secret value.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
app.py
CHANGED
|
@@ -42,6 +42,14 @@ SESSION_SECRET = os.environ.get("SESSION_SECRET", "inside-out-dev-session-secret
|
|
| 42 |
HF_MODEL = "google/gemma-4-26B-A4B-it:deepinfra" # "openai/gpt-oss-20b", "Qwen/Qwen3.6-27B:ovhcloud" #
|
| 43 |
SHOW_LOGIN = os.environ.get("SHOW_LOGIN", "").lower() in {"1", "true", "yes"}
|
| 44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
oauth = OAuth()
|
| 46 |
if GOOGLE_AUTH_ENABLED:
|
| 47 |
oauth.register(
|
|
|
|
| 42 |
HF_MODEL = "google/gemma-4-26B-A4B-it:deepinfra" # "openai/gpt-oss-20b", "Qwen/Qwen3.6-27B:ovhcloud" #
|
| 43 |
SHOW_LOGIN = os.environ.get("SHOW_LOGIN", "").lower() in {"1", "true", "yes"}
|
| 44 |
|
| 45 |
+
# Startup diagnostic (boolean only - never logs the secret value) so you can
|
| 46 |
+
# confirm from the Space logs whether the HF_TOKEN secret reached the app.
|
| 47 |
+
print(
|
| 48 |
+
f"[inside-out] startup: HF_TOKEN present: {bool(os.environ.get('HF_TOKEN'))} "
|
| 49 |
+
f"| model: {HF_MODEL}",
|
| 50 |
+
flush=True,
|
| 51 |
+
)
|
| 52 |
+
|
| 53 |
oauth = OAuth()
|
| 54 |
if GOOGLE_AUTH_ENABLED:
|
| 55 |
oauth.register(
|