-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathvisualizer_html_template
More file actions
77 lines (59 loc) · 2.27 KB
/
visualizer_html_template
File metadata and controls
77 lines (59 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<html>
<head>
<title>HA-GRU</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script>
var attention_values = ###WEIGHTS###
var label_names = ###LABEL_NAMES###
function float2color( percentage ) {
var color_part_dec = 255 * (1-percentage);
var color_part_hex = Number(parseInt( color_part_dec , 10)).toString(16);
return "#"+color_part_hex+color_part_hex + color_part_hex;
}
function myFunction(selected) {
attention = attention_values[selected]
for (i = 0; i < attention.length; i++) {
new_color = float2color(attention[i]);
document.getElementById("sent"+i).style.backgroundColor = new_color;
}
document.getElementById("title").innerText = 'Release Note: '+label_names[selected]
}
</script>
</head>
<body>
<div class="container">
<div class="starter-template">
<div class="row">
<div class="col-xs-12 col-md-8">
<h1>HA-GRU vizualizer</h1>
<h4>Correctly predicted codes (TP)</h4>
###TPS###
<h4>Wrongly predicted codes (FP):</h4>
###FPS###
<h4>Missed codes (FN):</h4>
###FNS###
<br/><br/>
<h3 id="title">Release Note:</h3>
<table class="table">
<tbody style="background-color:AliceBlue;">
###SENTS###
</tbody>
</table>
<nav aria-label="Page navigation example">
<ul class="pagination">
<li class="page-item"><a class="page-link" href="###PREV###">Previous</a></li>
<li class="page-item"><a class="page-link" href="###NEXT###">Next</a></li>
</ul>
</nav>
</div>
</div>
</div>
</div>
</body>
</html>