diff --git a/dsLightRag/Config/__pycache__/Config.cpython-310.pyc b/dsLightRag/Config/__pycache__/Config.cpython-310.pyc index 4b9aa7f7..c6d5e1ad 100644 Binary files a/dsLightRag/Config/__pycache__/Config.cpython-310.pyc and b/dsLightRag/Config/__pycache__/Config.cpython-310.pyc differ diff --git a/dsLightRag/Config/__pycache__/__init__.cpython-310.pyc b/dsLightRag/Config/__pycache__/__init__.cpython-310.pyc index eb18bbb4..a118d2da 100644 Binary files a/dsLightRag/Config/__pycache__/__init__.cpython-310.pyc and b/dsLightRag/Config/__pycache__/__init__.cpython-310.pyc differ diff --git a/dsLightRag/Tools/T3_graph_visual_with_html.py b/dsLightRag/Tools/T3_graph_visual_with_html.py index fbd814e5..2864ba3f 100644 --- a/dsLightRag/Tools/T3_graph_visual_with_html.py +++ b/dsLightRag/Tools/T3_graph_visual_with_html.py @@ -15,7 +15,6 @@ G = nx.read_graphml("../Topic/ChuZhongShuXue/graph_chunk_entity_relation.graphml # Create a Pyvis network net = Network(height="100vh", notebook=True) - # Convert NetworkX graph to Pyvis network net.from_nx(G) @@ -31,15 +30,14 @@ for edge in net.edges: if "description" in edge: edge["title"] = edge["description"] -# cdn.jsdelivr.net --> fastly.jsdelivr.net html_path = "knowledge_graph.html" -# Save and display the network -net.show(html_path) # Replace CDN URL from cdn.jsdelivr.net to fastly.jsdelivr.net with open(html_path, 'r', encoding='utf-8') as f: content = f.read() content = content.replace("cdn.jsdelivr.net", "fastly.jsdelivr.net") with open(html_path, 'w', encoding='utf-8') as f: - f.write(content) \ No newline at end of file + f.write(content) + +net.show(html_path) \ No newline at end of file diff --git a/dsLightRag/Tools/knowledge_graph.html b/dsLightRag/Tools/knowledge_graph.html new file mode 100644 index 00000000..05a5b796 --- /dev/null +++ b/dsLightRag/Tools/knowledge_graph.html @@ -0,0 +1,250 @@ + +
+ + + + + + + +