geronimo-pericoli commited on
Commit
ea4b465
verified
1 Parent(s): 83be3a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -44,18 +44,18 @@ def draw_graph():
44
  notebook=True,
45
  height="760px",
46
  width="100%",
47
- select_menu=True,
48
- neighborhood_highlight=True,
49
  cdn_resources="remote"
50
  )
51
 
52
  # A帽adir nodos y relaciones desde los datos del grafo
53
  for source, relation, target in kg_data:
54
  # Agregar nodos
55
- net.add_node(source, label=source, color="skyblue")
56
- net.add_node(target, label=target, color="skyblue")
57
  # Agregar aristas con la relaci贸n como etiqueta
58
- net.add_edge(source, target, title=relation, label=relation, color="black")
59
 
60
  # Generar el HTML como string
61
  html_contenido = net.generate_html()
@@ -726,7 +726,7 @@ with gr.Blocks(theme='sudeepshouche/minimalist', css=css) as demo:
726
  """)
727
 
728
  with gr.Row():
729
- grafo = gr.HTML()
730
 
731
  with gr.Accordion(elem_classes="accordion", label="Audit trail", open=False):
732
  with gr.Row():
 
44
  notebook=True,
45
  height="760px",
46
  width="100%",
47
+ #select_menu=True,
48
+ #neighborhood_highlight=True,
49
  cdn_resources="remote"
50
  )
51
 
52
  # A帽adir nodos y relaciones desde los datos del grafo
53
  for source, relation, target in kg_data:
54
  # Agregar nodos
55
+ net.add_node(source, label=source, color="#57faad", size=15)
56
+ net.add_node(target, label=target, color="#4795c1", size=15)
57
  # Agregar aristas con la relaci贸n como etiqueta
58
+ net.add_edge(source, target, title=relation, label=relation, color="orange")
59
 
60
  # Generar el HTML como string
61
  html_contenido = net.generate_html()
 
726
  """)
727
 
728
  with gr.Row():
729
+ grafo = gr.HTML(label="Grafo")
730
 
731
  with gr.Accordion(elem_classes="accordion", label="Audit trail", open=False):
732
  with gr.Row():