Spaces:
Runtime error
Runtime error
Update app.py
Browse files1234545678910111213141516import sys
from pathlib import Path
REPO_ROOT = Path(__file__).resolve().parent.parent
BACKEND_PATH = str(REPO_ROOT / "backend")
def _find_backend_path() -> Path:
current = Path(__file__).resolve().parent
for parent in [current] + list(current.parents):
candidate = parent / "backend"
if candidate.is_dir():
return candidate
raise 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