Merge remote-tracking branch 'origin/COG-adding_html_graph_render' into COG-adding_html_graph_render
This commit is contained in:
commit
70ced35557
2 changed files with 4 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
name: test | python 3.9
|
||||
name: test | python 3.12
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
|
@ -31,7 +31,7 @@ jobs:
|
|||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.9.x'
|
||||
python-version: '3.12.x'
|
||||
|
||||
- name: Install Poetry
|
||||
# https://github.com/snok/install-poetry#running-on-windows
|
||||
|
|
@ -365,6 +365,7 @@ def style_and_render_graph(p, G, layout_positions, node_attribute, node_colors,
|
|||
|
||||
from bokeh.embed import file_html
|
||||
from bokeh.resources import CDN
|
||||
|
||||
graph_renderer = from_networkx(G, layout_positions)
|
||||
node_radii = [0.02 + 0.1 * centrality[node] for node in G.nodes()]
|
||||
graph_renderer.node_renderer.data_source.data["radius"] = node_radii
|
||||
|
|
@ -404,6 +405,7 @@ async def create_cognee_style_network_with_logo(
|
|||
|
||||
from bokeh.embed import file_html
|
||||
from bokeh.resources import CDN
|
||||
|
||||
logging.info("Converting graph to serializable format...")
|
||||
G = await convert_to_serializable_graph(G)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue