Spaces:
Sleeping
Sleeping
Download paths.py from ENC-PSL/htr-vlm-annotator: direct link, hf CLI and curl.
- Browser
- Download file 364 Bytes
-
https://huggingface.co/spaces/ENC-PSL/htr-vlm-annotator/resolve/main/paths.py
- Command line
-
hf download hf://spaces/ENC-PSL/htr-vlm-annotator/paths.py
-
curl -L -o paths.py https://huggingface.co/spaces/ENC-PSL/htr-vlm-annotator/resolve/main/paths.py
364 Bytes
| from __future__ import annotations | |
| from pathlib import Path | |
| APP_DIR = Path(__file__).resolve().parent | |
| DATA_DIR = APP_DIR / "data" | |
| PROMPTS_DIR = DATA_DIR / "prompts" | |
| STATIC_DIR = APP_DIR / "static" | |
| def read_text(path: Path, default: str = "") -> str: | |
| try: | |
| return path.read_text(encoding="utf-8") | |
| except FileNotFoundError: | |
| return default | |