awacke1 commited on
Commit
157e35c
·
1 Parent(s): 2888994

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -0
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];