Skip to content

Commit

Permalink
Fix poetry issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Vasilije1990 committed Jan 8, 2025
1 parent 178b3ce commit a856c23
Show file tree
Hide file tree
Showing 3 changed files with 618 additions and 592 deletions.
17 changes: 12 additions & 5 deletions cognee/shared/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@
import tiktoken
import nltk
import base64
from bokeh.plotting import figure, from_networkx
from bokeh.models import Circle, MultiLine, HoverTool, ColumnDataSource, Range1d
from bokeh.plotting import output_file, show

from bokeh.embed import file_html
from bokeh.resources import CDN

import logging
import sys
Expand Down Expand Up @@ -364,6 +359,12 @@ def style_and_render_graph(p, G, layout_positions, node_attribute, node_colors,
"""
Apply styling and render the graph into the plot.
"""
from bokeh.plotting import figure, from_networkx
from bokeh.models import Circle, MultiLine, HoverTool, ColumnDataSource, Range1d
from bokeh.plotting import output_file, show

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
Expand Down Expand Up @@ -397,6 +398,12 @@ async def create_cognee_style_network_with_logo(
"""
Create a Cognee-inspired network visualization with an embedded logo.
"""
from bokeh.plotting import figure, from_networkx
from bokeh.models import Circle, MultiLine, HoverTool, ColumnDataSource, Range1d
from bokeh.plotting import output_file, show

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)

Expand Down
Loading

0 comments on commit a856c23

Please sign in to comment.