fix: guard parents[2] for HF runtime
Browse files
app.py
CHANGED
|
@@ -14,9 +14,12 @@ from pathlib import Path
|
|
| 14 |
|
| 15 |
import gradio as gr
|
| 16 |
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
from operon_ai import ATP_Store, MockProvider, Nucleus, SkillStage, skill_organism
|
| 22 |
from operon_ai.convergence.langgraph_compiler import (
|
|
|
|
| 14 |
|
| 15 |
import gradio as gr
|
| 16 |
|
| 17 |
+
try:
|
| 18 |
+
_repo_root = Path(__file__).resolve().parents[2]
|
| 19 |
+
if str(_repo_root) not in sys.path:
|
| 20 |
+
sys.path.insert(0, str(_repo_root))
|
| 21 |
+
except IndexError:
|
| 22 |
+
pass # Running on HF — operon-ai installed via requirements.txt
|
| 23 |
|
| 24 |
from operon_ai import ATP_Store, MockProvider, Nucleus, SkillStage, skill_organism
|
| 25 |
from operon_ai.convergence.langgraph_compiler import (
|