Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,6 +2,17 @@
|
|
| 2 |
DVNC.AI β app.py
|
| 3 |
Refactored for functional "Use as main insight" logic with academic rigor.
|
| 4 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
# ββ Standard library ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 7 |
import html
|
|
@@ -31,6 +42,8 @@ try:
|
|
| 31 |
except Exception:
|
| 32 |
BeautifulSoup = None
|
| 33 |
|
|
|
|
|
|
|
| 34 |
# ββ Internal modules βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 35 |
from dvnc_ai_v2_hf.agent_route_cards import build_agent_route_cards_html
|
| 36 |
from dvnc_ai_v2_hf.discovery_app_bridge import (
|
|
|
|
| 2 |
DVNC.AI β app.py
|
| 3 |
Refactored for functional "Use as main insight" logic with academic rigor.
|
| 4 |
"""
|
| 5 |
+
from dvnc_ai_v2_hf.graph_canvas_patch import render_graph_canvas_html
|
| 6 |
+
def build_learning_graph_html(nodes, edges, title="Self-Learning Knowledge Graph"):
|
| 7 |
+
return render_graph_canvas_html(
|
| 8 |
+
{
|
| 9 |
+
"status": "ok" if (nodes or edges) else "empty",
|
| 10 |
+
"nodes": nodes or [],
|
| 11 |
+
"edges": edges or [],
|
| 12 |
+
},
|
| 13 |
+
title=title,
|
| 14 |
+
height=780,
|
| 15 |
+
)
|
| 16 |
|
| 17 |
# ββ Standard library ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 18 |
import html
|
|
|
|
| 42 |
except Exception:
|
| 43 |
BeautifulSoup = None
|
| 44 |
|
| 45 |
+
learning_graph = gr.HTML(build_learning_graph_html([], []))
|
| 46 |
+
|
| 47 |
# ββ Internal modules βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 48 |
from dvnc_ai_v2_hf.agent_route_cards import build_agent_route_cards_html
|
| 49 |
from dvnc_ai_v2_hf.discovery_app_bridge import (
|