Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -15,6 +15,20 @@ from st_click_detector import click_detector
|
|
15 |
|
16 |
st.title('Graphviz Gallery: https://graphviz.org/gallery/')
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
st.graphviz_chart('''
|
19 |
digraph G2 {
|
20 |
node [shape=plaintext];
|
|
|
15 |
|
16 |
st.title('Graphviz Gallery: https://graphviz.org/gallery/')
|
17 |
|
18 |
+
# Using code:
|
19 |
+
|
20 |
+
# Create a graphlib graph object
|
21 |
+
graph = graphviz.Digraph()
|
22 |
+
graph.edge('Grandpa', 'Ancestors')
|
23 |
+
graph.edge('Grandma', 'Ancestors')
|
24 |
+
graph.edge('Uncle', 'Grandma')
|
25 |
+
graph.edge('Aunt', 'Grandma')
|
26 |
+
graph.edge('Mom', 'Grandma')
|
27 |
+
graph.edge('Brother', 'Mom')
|
28 |
+
graph.edge('Sister', 'Mom')
|
29 |
+
st.graphviz_chart(graph)
|
30 |
+
|
31 |
+
|
32 |
st.graphviz_chart('''
|
33 |
digraph G2 {
|
34 |
node [shape=plaintext];
|