Spaces:
Running on Zero
Running on Zero
Fix read_stage: first non-comment line only
Browse files53 unmodified lines5455565758596053 unmodified linesdef read_stage() -> str:path = Path(__file__).parent / "stage.txt"return path.read_text(encoding="utf-8").strip() if path.exists() else "idle"def hf_api() -> HfApi:53 unmodified lines54555657585960616263646553 unmodified linesdef read_stage() -> str:path = Path(__file__).parent / "stage.txt"if not path.exists():return "idle"# Stage name is the FIRST line; remaining lines are human annotations.lines = [line.strip() for line in path.read_text(encoding="utf-8").splitlines()]lines = [line for line in lines if line and not line.startswith("#")]return lines[0] if lines else "idle"def hf_api() -> HfApi:
executor_entrypoint.py+6-1