Spaces:
Running
Running
fix: Adafce crashing
Browse files- src/models.py +3 -0
src/models.py
CHANGED
|
@@ -228,6 +228,9 @@ class AIModelManager:
|
|
| 228 |
injection into Docker build is confirmed working.
|
| 229 |
"""
|
| 230 |
enable = os.getenv("ENABLE_ADAFACE", "0").strip() == "1"
|
|
|
|
|
|
|
|
|
|
| 231 |
if not enable:
|
| 232 |
print("⚠️ AdaFace disabled (ENABLE_ADAFACE != 1) — using ArcFace zero-padded 1024-D")
|
| 233 |
self.adaface_model = None
|
|
|
|
| 228 |
injection into Docker build is confirmed working.
|
| 229 |
"""
|
| 230 |
enable = os.getenv("ENABLE_ADAFACE", "0").strip() == "1"
|
| 231 |
+
hf_token_present = bool(os.getenv("HF_TOKEN", "").strip())
|
| 232 |
+
print(f" ENABLE_ADAFACE={os.getenv('ENABLE_ADAFACE', 'NOT SET')}")
|
| 233 |
+
print(f" HF_TOKEN present={'YES' if hf_token_present else 'NO (not set or empty)'}")
|
| 234 |
if not enable:
|
| 235 |
print("⚠️ AdaFace disabled (ENABLE_ADAFACE != 1) — using ArcFace zero-padded 1024-D")
|
| 236 |
self.adaface_model = None
|