Download code/common/paths.py from aziz9788/OvisOCR3-Arabic-workdir: direct link, hf CLI and curl.
- Browser
- Download file 1.14 kB
-
https://huggingface.co/datasets/aziz9788/OvisOCR3-Arabic-workdir/resolve/main/code/common/paths.py
- Command line
-
hf download hf://datasets/aziz9788/OvisOCR3-Arabic-workdir/code/common/paths.py
-
curl -L -o paths.py https://huggingface.co/datasets/aziz9788/OvisOCR3-Arabic-workdir/resolve/main/code/common/paths.py
1.14 kB
| """Shared folder layout. | |
| Everything this toolkit writes lives under one work directory (default: ``<repo>/data``, which is | |
| git-ignored). Override the whole tree with ``OCR_WORK_DIR`` or any single folder with its own variable: | |
| OCR_WORK_DIR root of all outputs default <repo>/data | |
| OCR_MODELS_DIR downloaded weights default $OCR_WORK_DIR/models | |
| OCR_UPSTREAM_DIR official code checked out at a pin default $OCR_WORK_DIR/upstream | |
| OCR_PREPARED_DIR converted training data default $OCR_WORK_DIR/prepared | |
| OCR_RUNS_DIR checkpoints, predictions, scores default $OCR_WORK_DIR/runs | |
| """ | |
| import os | |
| from pathlib import Path | |
| REPO_ROOT = Path(__file__).resolve().parents[1] | |
| WORK_DIR = Path(os.environ.get("OCR_WORK_DIR", str(REPO_ROOT / "data"))) | |
| MODELS_DIR = Path(os.environ.get("OCR_MODELS_DIR", str(WORK_DIR / "models"))) | |
| UPSTREAM_DIR = Path(os.environ.get("OCR_UPSTREAM_DIR", str(WORK_DIR / "upstream"))) | |
| PREPARED_DIR = Path(os.environ.get("OCR_PREPARED_DIR", str(WORK_DIR / "prepared"))) | |
| RUNS_DIR = Path(os.environ.get("OCR_RUNS_DIR", str(WORK_DIR / "runs"))) | |