chomera / chimera /paths.py
Lgr54HFi's picture
Upload folder using huggingface_hub
11c11f8 verified
raw
history blame contribute delete
358 Bytes
from __future__ import annotations
from pathlib import Path
PACKAGE_ROOT = Path(__file__).resolve().parent
REPO_ROOT = PACKAGE_ROOT.parent
DEFAULT_CONFIG_PATH = REPO_ROOT / "config.json"
def resolve_repo_path(path: str | Path) -> Path:
candidate = Path(path)
if candidate.is_absolute():
return candidate
return REPO_ROOT / candidate