Spaces:
Sleeping
Sleeping
Update app.py
Browse files12345678import sysfrom pathlib import PathREPO_ROOT = Path(__file__).resolve().parent.parentBACKEND_PATH = str(REPO_ROOT / "backend")if BACKEND_PATH not in sys.path:sys.path.insert(0, BACKEND_PATH)12345678910111213141516import sysfrom pathlib import Pathdef _find_backend_path() -> Path:current = Path(__file__).resolve().parentfor parent in [current] + list(current.parents):candidate = parent / "backend"if candidate.is_dir():return candidateraise RuntimeError("Could not find backend directory in parent paths")BACKEND_PATH = str(_find_backend_path())if BACKEND_PATH not in sys.path:sys.path.insert(0, BACKEND_PATH)
app.py+10-2