eaglelandsonce's picture
Update app.py
4ef9713 verified
raw
history blame
1.12 kB
import streamlit
from streamlit_agraph import agraph, Node, Edge, Config
nodes = []
edges = []
nodes.append( Node(id="Spiderman",
label="Peter Parker",
size=25,
shape="circularImage",
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_spiderman.png")
) # includes **kwargs
nodes.append( Node(id="Captain_Marvel",
size=25,
shape="circularImage",
image="http://marvel-force-chart.surge.sh/marvel_force_chart_img/top_captainmarvel.png")
)
edges.append( Edge(source="Captain_Marvel",
label="friend_of",
target="Spiderman",
# **kwargs
)
)
config = Config(width=750,
height=950,
directed=True,
physics=True,
hierarchical=False,
# **kwargs
)
return_value = agraph(nodes=nodes,
edges=edges,
config=config)