-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
70 lines (42 loc) · 1.57 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
62
63
64
65
66
67
68
69
70
<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'>
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<!-- <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"> -->
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@2.0.0/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='brain.js'></script>
</head>
<body>
<div class='container'>
<!-- TODO: Add title here -->
<h1 id='title'>Math Quizzler</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();
//predictImage();
clearCanvas();
nextQuestion();
});
</script>
</body>
<!-- to setup server python -m http.server 8000 --bind 127.0.0.1 -->
</html>