Spaces:
Running
Running
unknown
Claude Opus 5.5
Harden rewrite integrity, stop the final polish undoing humanization, add tests
585f232 Download devtools/env.py from Rasheed/Test_AI_writing: direct link, hf CLI and curl.
- Browser
- Download file 572 Bytes
-
https://huggingface.co/spaces/Rasheed/Test_AI_writing/resolve/main/devtools/env.py
- Command line
-
hf download hf://spaces/Rasheed/Test_AI_writing/devtools/env.py
-
curl -L -o env.py https://huggingface.co/spaces/Rasheed/Test_AI_writing/resolve/main/devtools/env.py
572 Bytes
| """Local development: load KEY=VALUE lines from ../.env into the environment (the Space gets these as secrets).""" | |
| import os | |
| from pathlib import Path | |
| def load(path=None): | |
| p = Path(path) if path else Path(__file__).resolve().parent.parent / ".env" | |
| if not p.exists(): | |
| return | |
| for line in p.read_text(encoding="utf-8").splitlines(): | |
| line = line.strip() | |
| if not line or line.startswith("#") or "=" not in line: | |
| continue | |
| k, v = line.split("=", 1) | |
| os.environ.setdefault(k.strip(), v.strip().strip('"').strip("'")) | |