-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
80 lines (55 loc) · 2.46 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
71
72
73
74
75
76
77
78
79
80
<!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 href='https://fonts.googleapis.com/css?family=Just+Another+Hand&display=swap' rel='stylesheet'>
<title>Math Garden</title>
<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/icons/favicon-16x16.png">
<link rel="manifest" href="/icons/site.webmanifest">
<link rel="mask-icon" href="/icons/safari-pinned-tab.svg" color="#5bbad5">
<link rel="shortcut icon" href="/icons/favicon.ico">
<meta name="msapplication-TileColor" content="#00aba9">
<meta name="msapplication-config" content="/icons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<!-- How to Draw on Screen -->
<script type='text/javascript' src='drawing.js'></script>
<!-- Math Problems -->
<script type="text/javascript" src="maths.js"></script>
<!-- Use Open CV to work with images: https://docs.opencv.org/4.1.0/opencv.js -->
<script src='vendor/opencv.js' type='text/javascript'></script>
<!-- Use TensorFlow.js to make predictions for model -->
<script src='https://cdn.jsdelivr.net/npm/@tensorflow/tfjs/dist/tf.min.js'> </script>
<!-- Our Image Data Pre-Processing & Prediction Logic -->
<script type='text/javascript' src='processing.js'></script>
</head>
<body>
<div class='container'>
<h1 id='title'>Math Garden</h1>
<h2 id='question'><span id='n1'>3</span> + <span id='n2'>2</span> = </h2>
<!-- <h5>Drawing Canvas:</h5> -->
<canvas id='my-canvas' width='150' height='150'></canvas>
</div>
<div class='container'>
<!-- <button id='restart' class='btn'>Restart</button> -->
<button id='checkAnswer' class='btn' value='Check'>Check Answer</button>
</div>
<!-- <h5>Processed Image Preview:</h5>
<canvas id='canvasOutput' width='28' height='28' style='border:1px solid #0aec0a;'></canvas> -->
<!-- Setup TF Model and Drawing Logic-->
<script type='text/javascript'>
// Number from 0.0 to 1.0
loadModel();
prepareCanvas();
nextQuestion();
//When user preses check answer button
document.getElementById('checkAnswer').addEventListener('click', function(){
checkAnswer();
});
</script>
</body>
</html>