Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,6 +15,7 @@ import xml.etree.ElementTree as ET
|
|
| 15 |
from pathlib import Path
|
| 16 |
from typing import Dict, List, Optional
|
| 17 |
from urllib.parse import quote
|
|
|
|
| 18 |
|
| 19 |
# ββ Third-party ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 20 |
import gradio as gr
|
|
@@ -42,7 +43,6 @@ from dvnc_ai_v2_hf.self_learning_graph import (
|
|
| 42 |
DEFAULT_SOURCES,
|
| 43 |
SEARCH_MODES,
|
| 44 |
SOURCE_OPTIONS,
|
| 45 |
-
build_learning_graph_html,
|
| 46 |
build_journal_html,
|
| 47 |
ingest_selected_papers,
|
| 48 |
parse_uploaded_pdf,
|
|
@@ -51,6 +51,8 @@ from dvnc_ai_v2_hf.self_learning_graph import (
|
|
| 51 |
safe_text,
|
| 52 |
)
|
| 53 |
|
|
|
|
|
|
|
| 54 |
# ββ Constants ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 55 |
MODELS = [
|
| 56 |
{"name": "DVNC Sovereign", "tag": "flagship", "desc": "Maximum depth orchestration for frontier discovery"},
|
|
@@ -711,7 +713,7 @@ with gr.Blocks(css=CSS, head=HEAD, theme=gr.themes.Base(), fill_height=True) as
|
|
| 711 |
parse_panel = gr.HTML('<div class="panel" style="padding:18px"><p>No parsed document yet.</p></div>')
|
| 712 |
ingest_summary = gr.Markdown("### Graph ingest status\n\nAwaiting paper selection.")
|
| 713 |
ingest_payload = gr.JSON(label="Graph ingest payload", value={"status": "empty", "nodes": [], "edges": []})
|
| 714 |
-
|
| 715 |
# ββ Event wiring ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 716 |
example_btn.click(fn=load_example, outputs=query)
|
| 717 |
|
|
|
|
| 15 |
from pathlib import Path
|
| 16 |
from typing import Dict, List, Optional
|
| 17 |
from urllib.parse import quote
|
| 18 |
+
from dvnc_ai_v2_hf.graph_canvas_patch import render_graph_canvas_html
|
| 19 |
|
| 20 |
# ββ Third-party ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 21 |
import gradio as gr
|
|
|
|
| 43 |
DEFAULT_SOURCES,
|
| 44 |
SEARCH_MODES,
|
| 45 |
SOURCE_OPTIONS,
|
|
|
|
| 46 |
build_journal_html,
|
| 47 |
ingest_selected_papers,
|
| 48 |
parse_uploaded_pdf,
|
|
|
|
| 51 |
safe_text,
|
| 52 |
)
|
| 53 |
|
| 54 |
+
from dvnc_ai_v2_hf.graph_canvas_patch import render_graph_canvas_html
|
| 55 |
+
|
| 56 |
# ββ Constants ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 57 |
MODELS = [
|
| 58 |
{"name": "DVNC Sovereign", "tag": "flagship", "desc": "Maximum depth orchestration for frontier discovery"},
|
|
|
|
| 713 |
parse_panel = gr.HTML('<div class="panel" style="padding:18px"><p>No parsed document yet.</p></div>')
|
| 714 |
ingest_summary = gr.Markdown("### Graph ingest status\n\nAwaiting paper selection.")
|
| 715 |
ingest_payload = gr.JSON(label="Graph ingest payload", value={"status": "empty", "nodes": [], "edges": []})
|
| 716 |
+
graph_html = render_graph_canvas_html({"status": "ok", "nodes": graph_nodes, "edges": graph_edges},title="Some title",height=780,)
|
| 717 |
# ββ Event wiring ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 718 |
example_btn.click(fn=load_example, outputs=query)
|
| 719 |
|