-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
42 lines (37 loc) · 1.24 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
<html>
<head>
<title>TensorFlow.js Digit Recognizer</title>
<!-- Load TensorFlow.js -->
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/[email protected]"> </script>
<!-- Load MNIST data set -->
<script src="./mnist.js"></script>
<!-- Load the model creation and training functions -->
<script src="./model.js"></script>
<!-- Load the canvas drawing and manipulation functions -->
<script src="./drawing.js"></script>
<!-- Main script containing the entry point that gets executed after DOMContentLoaded -->
<script src="./main.js"></script>
</head>
<body>
<h1>TensorFlow.js Digit Recognizer</h1>
<div>
<button id="train">Train</button>
</div>
<div>
<div>
<h2>Drawing Pad</h2>
<p>Brush Width: <input id="brushWidth" type="range" min="5" max="25" value="15"></p>
<canvas id="drawPad" width="280" height="280"></canvas>
<p><button id="clear">Clear</button></p>
</div>
<div>
<h2>Model Input</h2>
<canvas id="tfInput" width="28" height="28"></canvas>
</div>
<div>
<h2>Recognized Digit</h2>
<h3 id="output"></h3>
</div>
</div>
</body>
</html>