toilaluan commited on
Commit
69bcda0
·
1 Parent(s): 3f07cae
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -25,7 +25,7 @@ def draw_colored_graph(dependencies, questions, answers):
25
 
26
  # Draw nodes with custom colors and labels
27
  node_colors = [G.nodes[node]['color'] for node in G.nodes()]
28
- nx.draw_networkx_nodes(G, pos, node_color=node_colors, node_size=2000, edgecolors='black')
29
 
30
  # Draw edges with arrows
31
  nx.draw_networkx_edges(G, pos, arrowstyle='-|>', arrows=True, arrowsize=20, connectionstyle='arc3,rad=0.1')
@@ -75,9 +75,8 @@ description = """
75
  interface = gr.Interface(
76
  fn=process_image,
77
  inputs=[gr.Image(type="pil", label="Input Image"), gr.Textbox(label="Enter your prompt")],
78
- outputs=[gr.Image(type="pil", label="Graph Score Image"), gr.Textbox(label="Analyzed Result")],
79
  theme=gr.themes.Soft(),
80
- title="",
81
  description=description
82
  )
83
 
 
25
 
26
  # Draw nodes with custom colors and labels
27
  node_colors = [G.nodes[node]['color'] for node in G.nodes()]
28
+ nx.draw_networkx_nodes(G, pos, node_color=node_colors, node_size=2000, edgecolors='white')
29
 
30
  # Draw edges with arrows
31
  nx.draw_networkx_edges(G, pos, arrowstyle='-|>', arrows=True, arrowsize=20, connectionstyle='arc3,rad=0.1')
 
75
  interface = gr.Interface(
76
  fn=process_image,
77
  inputs=[gr.Image(type="pil", label="Input Image"), gr.Textbox(label="Enter your prompt")],
78
+ outputs=[gr.Image(type="pil", label="Graph Score Image", format="png"), gr.Textbox(label="Analyzed Result")],
79
  theme=gr.themes.Soft(),
 
80
  description=description
81
  )
82