Spaces:
Running on Zero
Running on Zero
rydlr commited on
Commit ·
f88caad
1
Parent(s): cc3cd7d
Fix: explicit HF_TOKEN passing to text encoder subprocess
Browse files
app.py
CHANGED
|
@@ -60,6 +60,15 @@ def _start_text_encoder_server() -> subprocess.Popen:
|
|
| 60 |
env = os.environ.copy()
|
| 61 |
env["GRADIO_SERVER_NAME"] = "127.0.0.1"
|
| 62 |
env["GRADIO_SERVER_PORT"] = str(TEXT_ENCODER_PORT)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
print(f"[movimento][boot] starting text encoder server at 127.0.0.1:{TEXT_ENCODER_PORT}")
|
| 64 |
proc = subprocess.Popen([sys.executable, "-m", "kimodo.scripts.run_text_encoder_server"], env=env)
|
| 65 |
_wait_for_port(TEXT_ENCODER_PORT, timeout_s=45.0)
|
|
|
|
| 60 |
env = os.environ.copy()
|
| 61 |
env["GRADIO_SERVER_NAME"] = "127.0.0.1"
|
| 62 |
env["GRADIO_SERVER_PORT"] = str(TEXT_ENCODER_PORT)
|
| 63 |
+
|
| 64 |
+
# Ensure HF_TOKEN is explicitly passed to text encoder subprocess
|
| 65 |
+
hf_token = os.environ.get("HF_TOKEN")
|
| 66 |
+
if hf_token:
|
| 67 |
+
env["HF_TOKEN"] = hf_token
|
| 68 |
+
print(f"[movimento][boot] HF_TOKEN set for text encoder (len={len(hf_token)})")
|
| 69 |
+
else:
|
| 70 |
+
print(f"[movimento][boot] WARNING: HF_TOKEN not found in environment")
|
| 71 |
+
|
| 72 |
print(f"[movimento][boot] starting text encoder server at 127.0.0.1:{TEXT_ENCODER_PORT}")
|
| 73 |
proc = subprocess.Popen([sys.executable, "-m", "kimodo.scripts.run_text_encoder_server"], env=env)
|
| 74 |
_wait_for_port(TEXT_ENCODER_PORT, timeout_s=45.0)
|