-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
61 lines (41 loc) · 1.41 KB
/
index.html
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
<!DOCTYPE html>
<html lang='en'>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
<!-- Custom styling -->
<link rel='stylesheet' href='css/styles.css'>
<!-- Custom font -->
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Just+Another+Hand&display=swap'>
<!-- Favicon -->
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/[email protected]/dist/tf.min.js"></script>
<script src='vendor/opencv.js'></script>
<!-- TODO: Add Javascript files here -->
<script src='drawing.js'></script>
<script src='processing.js'></script>
<script src='maths.js'></script>
</head>
<body>
<div class='container'>
<!-- TODO: Add title here -->
<h1 id='title'>Math Garden</h1>
<h2 id='question'><span id='n1'>3</span> + <span id='n2'>2</span> = </h2>
<!-- TODO: Add a drawing canvas here -->
<canvas id='my-canvas' width="150" height="150"></canvas>
</div>
<div class='container'>
<button id='checkAnswer' class='btn' value='Check'>Check Answer</button>
</div>
<!-- TODO: Set up TF model and drawing logic-->
<script>
loadModel();
prepareCanvas();
nextQuestion();
document.getElementById('checkAnswer').addEventListener('click', function () {
checkAnswer();
clearCanvas();
nextQuestion();
});
</script>
</body>
</html>