-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
47 lines (47 loc) · 1.82 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
<html>
<head>
<title>TensorFlow.js Demo</title>
<link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/app.css">
<script type="text/javascript" src="js/imagenet_classes.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@latest"></script>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="js/mobile-net.js"></script>
</head>
<body>
<div class="container">
<div class="mobilenet-demo-container">
<h3>TensorFlow.js Demo</h3>
<div class="demo-wrapper">
<div>
<button id="load-button" class="input-button" onclick="loadModel()">Load Model</button>
<button id="demo-image-button" class="input-button" onclick="loadDemoImage()">Demo Image</button>
<label for="select-file-image" class="input-button">
Upload Image
</label>
<input id="select-file-image" type="file" onchange="loadFile(event)" style="display: none">
<div id="progress-box" style="display: none; width: 100% !important;">
<img src="assets/loading.gif" id="demo-load" width="100px" />
<p style="color: white;">Loading mobilenet model..</p>
</div>
</div>
<div>
<button id="predict-button" class="input-button predict-button" onclick="predButton()">Predict</button>
</div>
</div>
<div class="demo-output">
<div class="out-box" id="select-file-box" style="display: none;">
<img id='test-image' />
</div>
<div class="out-box" id="predict-box" style="display: none;">
<p id="prediction"></p>
<br>
<p><b style="color: #c2c2c2 !important; font-style: italic; font-weight: 100; font-size: 11px;">Top-5 Predictions</b></p>
<ul id="predict-list">
</ul>
</div>
</div>
</div>
</div>
</body>
</html>