woletee commited on
Commit
5de10b8
·
1 Parent(s): f60fef5

Switch to Flask with HTML visualization

Browse files
Files changed (2) hide show
  1. static/styles.css +32 -10
  2. templates/results.html +23 -2
static/styles.css CHANGED
@@ -9,20 +9,42 @@ h1, h2, h3 {
9
  color: #FFD700;
10
  }
11
 
 
 
 
 
 
 
 
12
  .grid-wrapper {
13
  background-color: #222;
14
  padding: 15px;
15
- margin: 20px auto;
16
  border-radius: 10px;
17
- width: 80%;
18
- box-shadow: 0 0 10px #fff2;
 
 
 
19
  }
20
 
21
- pre {
22
- background: #000;
23
- color: #0f0;
24
- padding: 10px;
25
- border-radius: 5px;
26
- text-align: left;
27
- overflow-x: auto;
28
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  color: #FFD700;
10
  }
11
 
12
+ .grid-container {
13
+ display: flex;
14
+ justify-content: center;
15
+ gap: 50px;
16
+ margin-bottom: 30px;
17
+ }
18
+
19
  .grid-wrapper {
20
  background-color: #222;
21
  padding: 15px;
 
22
  border-radius: 10px;
23
+ box-shadow: 0 0 10px #fff3;
24
+ }
25
+
26
+ .grid {
27
+ display: inline-block;
28
  }
29
 
30
+ .grid-row {
31
+ display: flex;
 
 
 
 
 
32
  }
33
+
34
+ .cell {
35
+ width: 30px;
36
+ height: 30px;
37
+ border: 1px solid #333;
38
+ }
39
+
40
+ /* ARC Color Mapping: You can customize these */
41
+ .color-0 { background-color: #000; } /* black */
42
+ .color-1 { background-color: #00f; } /* blue */
43
+ .color-2 { background-color: #0f0; } /* green */
44
+ .color-3 { background-color: #f00; } /* red */
45
+ .color-4 { background-color: #ff0; } /* yellow */
46
+ .color-5 { background-color: #0ff; } /* cyan */
47
+ .color-6 { background-color: #f0f; } /* magenta */
48
+ .color-7 { background-color: #fff; } /* white */
49
+ .color-8 { background-color: orange; }
50
+ .color-9 { background-color: pink; }
templates/results.html CHANGED
@@ -15,12 +15,33 @@
15
 
16
  <h2>Input / Output Pairs</h2>
17
  {% for pair in input_output_pairs %}
 
18
  <div class="grid-wrapper">
19
  <h3>Input Grid</h3>
20
- <pre>{{ pair[0] }}</pre>
 
 
 
 
 
 
 
 
 
 
 
21
  <h3>Output Grid</h3>
22
- <pre>{{ pair[1] }}</pre>
 
 
 
 
 
 
 
 
23
  </div>
 
24
  {% endfor %}
25
 
26
  <h2>Best Program</h2>
 
15
 
16
  <h2>Input / Output Pairs</h2>
17
  {% for pair in input_output_pairs %}
18
+ <div class="grid-container">
19
  <div class="grid-wrapper">
20
  <h3>Input Grid</h3>
21
+ <div class="grid">
22
+ {% for row in pair[0] %}
23
+ <div class="grid-row">
24
+ {% for cell in row %}
25
+ <div class="cell color-{{ cell }}"></div>
26
+ {% endfor %}
27
+ </div>
28
+ {% endfor %}
29
+ </div>
30
+ </div>
31
+
32
+ <div class="grid-wrapper">
33
  <h3>Output Grid</h3>
34
+ <div class="grid">
35
+ {% for row in pair[1] %}
36
+ <div class="grid-row">
37
+ {% for cell in row %}
38
+ <div class="cell color-{{ cell }}"></div>
39
+ {% endfor %}
40
+ </div>
41
+ {% endfor %}
42
+ </div>
43
  </div>
44
+ </div>
45
  {% endfor %}
46
 
47
  <h2>Best Program</h2>