Spaces:
Sleeping
Sleeping
File size: 5,969 Bytes
e1ef6ea bbb73e2 e1ef6ea 7e05a5a e1ef6ea a0d1406 e1ef6ea 5fa824e e1ef6ea 3a1a312 5fa824e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
import streamlit
from streamlit_agraph import agraph, Node, Edge, Config
nodes = []
edges = []
#Departamento Direcci贸n
nodes.append( Node(id="CEO",
label="Direccion",
size=50,
shape="circularImage",
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_spiderman.png")
) # includes **kwargs
nodes.append( Node(id="EstrategiaCEO",
size=25,
#shape="circularImage",
shape="square",
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png")
)
#Gesti贸n Proyectos
nodes.append( Node(id="PM",
label="Gesti贸n Proyectos",
size=25,
shape="circularImage",
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_spiderman.png")
) # includes **kwargs
nodes.append( Node(id="EstrategiaPM",
size=25,
#shape="circularImage",
shape="square",
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png")
)
nodes.append( Node(id="Proyectos activos",
size=25,
#shape="circularImage",
shape="star",
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png")
)
#I+D
nodes.append( Node(id="I+D",
label="Innovaci贸n y Desarrollo",
size=25,
shape="circularImage",
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_spiderman.png")
) # includes **kwargs
nodes.append( Node(id="EstrategiaI+D",
size=25,
#shape="circularImage",
shape="square",
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png")
)
nodes.append( Node(id="Proyectos I+D activos",
size=25,
#shape="circularImage",
shape="star",
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png")
)
#Comercial
nodes.append( Node(id="ComercialIndustria",
label="Ventas",
size=25,
shape="circularImage",
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_spiderman.png")
) # includes **kwargs
nodes.append( Node(id="EstrategiaV",
size=25,
#shape="circularImage",
shape="square",
#llink="https://JPLTedCas-TedCasDashBoard.hf.space/Hoja%20de%20ruta%20MKT_TedCas%20Health%202025.docx"#https://huggingface.co/spaces/JPLTedCas/TedCasDashBoard/Hoja%20de%20ruta%20MKT_TedCas%20Health%202025.docx",
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png")
)
nodes.append( Node(id="Funnel",
size=25,
#shape="circularImage",
shape="star",
link="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png",
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png")
)
nodes.append( Node(id="ProductosIndustria",
size=25,
#shape="circularImage",
shape="hexagon",
#url="https://docs.google.com/spreadsheets/d/1lEgeCuetraS2rNiNKkeH7PjC0Y3RtxBs/edit?usp=sharing&ouid=103898371342229161899&rtpof=true&sd=true",
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png")
)
#EDGES
#COMERCIAL INDUSTRIAL
edges.append( Edge(source="ComercialIndustria",
label="define",
target="EstrategiaV",
# **kwargs
)
)
edges.append( Edge(source="ComercialIndustria",
label="proyectos conseguidos",
target="Funnel",
# **kwargs
)
)
edges.append( Edge(source="ComercialIndustria",
label="productos que vende",
target="ProductosIndustria",
# **kwargs
)
)
#DIRECCION
edges.append( Edge(source="CEO",
label="dirige",
target="ComercialIndustria",
# **kwargs
)
)
edges.append( Edge(source="CEO",
label="dirige",
target="I+D",
# **kwargs
)
)
edges.append( Edge(source="CEO",
label="dirige",
target="PM",
# **kwargs
)
)
config = Config(width=750,
height=950,
directed=True,
physics=True,
hierarchical=False,
# **kwargs
)
return_value = agraph(nodes=nodes,
edges=edges,
config=config)
# Si el usuario selecciona un nodo, mostrar un enlace clickeable
if return_value and return_value["node"]:
selected_node = return_value["node"]
if selected_node == "ProductosIndustria":
#url = "https://docs.google.com/spreadsheets/d/1lEgeCuetraS2rNiNKkeH7PjC0Y3RtxBs/edit?usp=sharing"
url = "http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png"
st.markdown(f"馃敆 **[Abrir Documento](<{url}>)**", unsafe_allow_html=True)
|