Saluki / scripts /_bootstrap.py
wuxing0105's picture
Upload folder using huggingface_hub
4d43445 verified
Raw
History Blame Contribute Delete
415 Bytes
"""Make command-line entry points independent of the current directory."""
from __future__ import annotations
import os
import sys
from pathlib import Path
PROJECT_ROOT = Path(__file__).resolve().parents[1]
def configure_runtime() -> Path:
root = str(PROJECT_ROOT)
if root not in sys.path:
sys.path.insert(0, root)
os.environ.setdefault("TF_USE_LEGACY_KERAS", "1")
return PROJECT_ROOT