Spaces:
Runtime error
Runtime error
Create new file
Browse files
app.py
ADDED
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import graphviz as graphviz
|
3 |
+
import pandas as pd
|
4 |
+
import numpy as np
|
5 |
+
|
6 |
+
st.title('Graph Arrangement for Card Deck Organization of Classes Suits and Orders')
|
7 |
+
|
8 |
+
|
9 |
+
|
10 |
+
st.graphviz_chart('''
|
11 |
+
digraph G {
|
12 |
+
fontname="Helvetica,Arial,sans-serif"
|
13 |
+
node [fontname="Helvetica,Arial,sans-serif"]
|
14 |
+
edge [fontname="Helvetica,Arial,sans-serif"]
|
15 |
+
subgraph cluster_1 {
|
16 |
+
node [ style=filled,shape="box",fillcolor="antiquewhite:aquamarine" ]n5;
|
17 |
+
node [ shape="ellipse",fillcolor="bisque4:blue2" ]n4;
|
18 |
+
node [ shape="circle",fillcolor="cadetblue1:chocolate1" ]n3;
|
19 |
+
node [ shape="diamond",fillcolor="crimson:cyan4" ]n2;
|
20 |
+
node [ shape="triangle",fillcolor="deepskyblue2:firebrick" ]n1;
|
21 |
+
node [ shape="pentagon",fillcolor="gray24:gray88" ]n0;
|
22 |
+
label = "X11 Colors";
|
23 |
+
}
|
24 |
+
subgraph cluster_2 {
|
25 |
+
node [ style=filled,shape="box",fillcolor="bisque:brown" ]n11;
|
26 |
+
node [ shape="ellipse",fillcolor="green:darkorchid" ]n10;
|
27 |
+
node [ shape="circle",fillcolor="deepskyblue:gold" ]n9;
|
28 |
+
node [ shape="diamond",fillcolor="lightseagreen:orangered" ]n8;
|
29 |
+
node [ shape="triangle",fillcolor="turquoise:salmon" ]n7;
|
30 |
+
node [ shape="pentagon",fillcolor="snow:black" ]n6;
|
31 |
+
label = "SVG Colors";
|
32 |
+
}
|
33 |
+
subgraph cluster_3 {
|
34 |
+
node [ style=filled,shape="box",fillcolor="/accent3/1:/accent3/3" ]n17;
|
35 |
+
node [ shape="ellipse",fillcolor="/accent4/1:/accent4/4" ]n16;
|
36 |
+
node [ shape="circle",fillcolor="/accent5/1:/accent5/5" ]n15;
|
37 |
+
node [ shape="diamond",fillcolor="/accent6/1:/accent6/6" ]n14;
|
38 |
+
node [ shape="triangle",fillcolor="/accent7/1:/accent7/7" ]n13;
|
39 |
+
node [ shape="pentagon",fillcolor="/accent8/1:/accent8/8" ]n12;
|
40 |
+
label = "Brewer - accent";
|
41 |
+
}
|
42 |
+
subgraph cluster_4 {
|
43 |
+
node [ style=filled,shape="box",fillcolor="/blues3/1:/blues3/2" ]n23;
|
44 |
+
node [ shape="ellipse",fillcolor="/blues4/1:/blues4/3" ]n22;
|
45 |
+
node [ shape="circle",fillcolor="/blues5/1:/blues5/4" ]n21;
|
46 |
+
node [ shape="diamond",fillcolor="/blues6/1:/blues6/5" ]n20;
|
47 |
+
node [ shape="triangle",fillcolor="/blues7/1:/blues7/6" ]n19;
|
48 |
+
node [ shape="pentagon",fillcolor="/blues8/1:/blues8/7" ]n18;
|
49 |
+
label = "Brewer - blues";
|
50 |
+
}
|
51 |
+
n3 -> n9 -> n15 -> n21;
|
52 |
+
}
|
53 |
+
''')
|
54 |
+
|
55 |
+
st.graphviz_chart('''
|
56 |
+
digraph G {bgcolor="#0000FF44:#FF000044" gradientangle=90
|
57 |
+
fontname="Helvetica,Arial,sans-serif"
|
58 |
+
node [fontname="Helvetica,Arial,sans-serif"]
|
59 |
+
edge [fontname="Helvetica,Arial,sans-serif"]
|
60 |
+
subgraph cluster_0 {
|
61 |
+
style=filled;
|
62 |
+
color=lightgrey;
|
63 |
+
fillcolor="darkgray:gold";
|
64 |
+
gradientangle=0
|
65 |
+
node [fillcolor="yellow:green" style=filled gradientangle=270] a0;
|
66 |
+
node [fillcolor="lightgreen:red"] a1;
|
67 |
+
node [fillcolor="lightskyblue:darkcyan"] a2;
|
68 |
+
node [fillcolor="cyan:lightslateblue"] a3;
|
69 |
+
a0 -> a1 -> a2 -> a3;
|
70 |
+
label = "process #1";
|
71 |
+
}
|
72 |
+
subgraph cluster_1 {
|
73 |
+
node [fillcolor="yellow:magenta"
|
74 |
+
style=filled gradientangle=270] b0;
|
75 |
+
node [fillcolor="violet:darkcyan"] b1;
|
76 |
+
node [fillcolor="peachpuff:red"] b2;
|
77 |
+
node [fillcolor="mediumpurple:purple"] b3;
|
78 |
+
b0 -> b1 -> b2 -> b3;
|
79 |
+
label = "process #2";
|
80 |
+
color=blue
|
81 |
+
fillcolor="darkgray:gold";
|
82 |
+
gradientangle=0
|
83 |
+
style=filled;
|
84 |
+
}
|
85 |
+
start -> a0;
|
86 |
+
start -> b0;
|
87 |
+
a1 -> b3;
|
88 |
+
b2 -> a3;
|
89 |
+
a3 -> a0;
|
90 |
+
a3 -> end;
|
91 |
+
b3 -> end;
|
92 |
+
start [shape=Mdiamond ,
|
93 |
+
fillcolor="pink:red",
|
94 |
+
gradientangle=90,
|
95 |
+
style=radial];
|
96 |
+
end [shape=Msquare,
|
97 |
+
fillcolor="lightyellow:orange",
|
98 |
+
style=radial,
|
99 |
+
gradientangle=90];
|
100 |
+
}
|
101 |
+
''')
|