Spaces:
Running
Running
unknown
Claude Opus 5.5
Harden rewrite integrity, stop the final polish undoing humanization, add tests
585f232 Download devtools/run_local.py from Rasheed/Test_AI_writing: direct link, hf CLI and curl.
- Browser
- Download file 780 Bytes
-
https://huggingface.co/spaces/Rasheed/Test_AI_writing/resolve/main/devtools/run_local.py
- Command line
-
hf download hf://spaces/Rasheed/Test_AI_writing/devtools/run_local.py
-
curl -L -o run_local.py https://huggingface.co/spaces/Rasheed/Test_AI_writing/resolve/main/devtools/run_local.py
780 Bytes
| """Run the app on this machine: loads ../.env (the Space gets these values as secrets), keeps the user database out | |
| of the repository, then starts app.py. python devtools/run_local.py""" | |
| import os | |
| import runpy | |
| import sys | |
| import tempfile | |
| from pathlib import Path | |
| ROOT = Path(__file__).resolve().parent.parent | |
| sys.path.insert(0, str(ROOT)) | |
| sys.path.insert(0, str(Path(__file__).resolve().parent)) | |
| import env # noqa: E402 | |
| env.load() | |
| os.environ.setdefault("USERS_DB", str(Path(tempfile.gettempdir()) / "cs_suite_dev_users.db")) | |
| os.environ.setdefault("LT_MODE", "off") # LanguageTool needs Java + a 260 MB download: opt in with LT_MODE=local | |
| os.environ.setdefault("GRADIO_SERVER_PORT", "7860") | |
| os.chdir(ROOT) | |
| runpy.run_path(str(ROOT / "app.py"), run_name="__main__") | |