We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb49c10 commit 781377eCopy full SHA for 781377e
1 file changed
renard/ui.py
@@ -183,7 +183,7 @@ def run_pipeline(
183
184
# plotting, see https://github.com/gradio-app/gradio/issues/4574
185
G = graph_with_names(out.character_network, name_style="most_frequent")
186
- max_degree = max(v for _, v in G.degree)
+ max_degree = max(v for _, v in G.degree) if len(G.degree) > 0 else 0
187
for u in G.nodes:
188
G.nodes[u]["size"] = 10 + G.degree[u]
189
G.nodes[u]["color"] = get_viridis_hex(G.degree[u], 0, max_degree)
0 commit comments