diff --git a/backend/routers/system.py b/backend/routers/system.py index b7c4471..750b84e 100644 --- a/backend/routers/system.py +++ b/backend/routers/system.py @@ -1,5 +1,6 @@ """F 组:系统(4 个端点)""" import os +import sys import time from pathlib import Path @@ -20,7 +21,7 @@ async def health_check(): load_dotenv(env_path, override=False) mineru_python = Path(os.getenv("MINERU_PYTHON", str(Path(__file__).parent.parent.parent / "mineru_mvp" / ".venv" / "bin" / "python"))) - backend_python = Path(__file__).parent.parent / ".venv" / "bin" / "python" + backend_python = Path(os.getenv("LANGEXTRACT_PYTHON", str(Path(sys.executable)))) deepseek_key = os.getenv("DEEPSEEK_API_KEY", "") deepseek_url = os.getenv("DEEPSEEK_BASE_URL", "https://api.deepseek.com") @@ -133,9 +134,10 @@ async def get_demo_data(): edges = fs.load_kg_edges() if not nodes: - # Fallback: load from existing graphrag_pipeline output - legacy_nodes_path = Path(__file__).parent.parent.parent / "backend" / "output" / "kg_nodes.json" - legacy_edges_path = Path("F:/GraphRAGAgent/graphrag_pipeline/output/kg_edges.json") + # Fallback: load from backend/output/ directory + legacy_output = Path(__file__).parent.parent / "output" + legacy_nodes_path = legacy_output / "kg_nodes.json" + legacy_edges_path = legacy_output / "kg_edges.json" if legacy_nodes_path.exists(): import json nodes = json.loads(legacy_nodes_path.read_text(encoding="utf-8")) diff --git a/frontend/index.html b/frontend/index.html index 1f4095b..ae5561c 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -4,7 +4,7 @@
-