Adi12345 commited on
Commit
e4f6173
Β·
verified Β·
1 Parent(s): 6267a45

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
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 (