-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
88 lines (88 loc) · 4.72 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
81
82
83
84
85
86
87
88
<!doctype html>
<html class="no-js" lang="en-us">
<head>
<meta charset="utf-8">
<title>TensorFlow.js Transfer Learning Image Classifier</title>
<meta name="description" content="Prototype for testing Tensorflow.js image classification">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:title" content="">
<meta property="og:type" content="">
<meta property="og:url" content="">
<meta property="og:image" content="">
<!--<link rel="manifest" href="site.webmanifest">-->
<link rel="apple-touch-icon" href="icon.png">
<!-- Place favicon.ico in the root directory -->
<!--<link rel="stylesheet" href="./styles/global.css">-->
<style>
* {box-sizing:border-box;}
:root {
--foreground: #152028;
--background: #f8f8f8;
--link: #CF6679;
--base-color: #444;
--dark-color: #213c69;
--light-color: #f4f5f7;
--success-color: #f0f8f1;
--warning-color: #fbeeec;
--spacing: 1rem;
}
html {margin:0;padding:0;scroll-behavior:smooth;}
body {background:var(--background);color:var(--foreground);font-family:-apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';margin:0;padding:0;font-size:16px;line-height:1.5rem;}
.columns {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-rows: 1fr;
gap: 0px 0px;
}
header,main,nav,footer {padding:var(--spacing);}
figure {margin:0;padding:0;}
img,video {max-width:100%;}
img {border-style:none;}
.caption {font-size:1.3em;}
@media (prefers-color-scheme: dark) {
:root {
--foreground:#f8f8f8;
--background:#152028;
--link:#03DAC6;
}
a{color:var(--link);}
}
/*medium screen view < 801px (based on 16px browser default)*/
@media all and (max-width:50.1em) {}
/*small screen view < 481px (based on 16px browser default)*/
@media all and (max-width:30.063em) {
details {margin-top:var(--spacing);}
.columns {grid-template-columns:none;}
}
</style>
<meta name="theme-color" content="#fafafa">
<!-- Load the latest version of TensorFlow.js -->
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@latest"></script>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow-models/mobilenet"></script>
</head>
<body>
<header role="banner">
<h1>Image Classifier</h1>
<p>TensorFlow.js Transfer Learning</p>
</header>
<main id="app" class="columns" role="main">
<figure>
<!-- Add an image that we will use to test -->
<!--<img id="source" src="./assets/img/hres-523.jpg" width="227" height="227"/>-->
<img id="source" height="64" width="64" src="data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8' standalone='no'%3F%3E%3Csvg xmlns:svg='http://www.w3.org/2000/svg' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.0' width='64px' height='64px' viewBox='0 0 128 128' xml:space='preserve'%3E%3Crect x='0' y='0' width='100%25' height='100%25' fill='%23FFFFFF' /%3E%3Cg%3E%3Cpath fill='%23000000' d='M116.7 66.28a52.86 52.86 0 0 1-1 8.18l9.8 7.57-1.78 4.67-1.77 4.67-12.36-.82a52.87 52.87 0 0 1-4.7 6.7L110 108.5l-3.75 3.3-3.75 3.32L92 108.67a52.6 52.6 0 0 1-7.45 3.9l-.66 12.3-4.87 1.2-4.86 1.2-6.38-10.66q-1.9.2-3.88.2-2.15 0-4.25-.14l-6.3 10.64-4.84-1.2-4.85-1.2-.7-12.43a52.6 52.6 0 0 1-6.7-3.5l-10.6 6.64-3.75-3.3-3.76-3.3 5.05-11.4a52.88 52.88 0 0 1-4.73-6.73l-12.34.9-1.8-4.66-1.8-4.67 9.7-7.67a52.8 52.8 0 0 1-1-8.05l-11.4-5 .56-4.95.54-4.97 12.26-2.3a52.37 52.37 0 0 1 2.94-7.83L8.4 32l2.8-4.14 2.8-4.14 12 3.68a53.06 53.06 0 0 1 6-5.33L29.57 9.8l4.4-2.37 4.43-2.35 8.95 8.86a52.4 52.4 0 0 1 8-1.98L59 0h10l3.66 11.96a52.4 52.4 0 0 1 7.8 1.9L89.26 5l4.42 2.3 4.43 2.34-2.3 12.27a52.98 52.98 0 0 1 6.2 5.5l11.9-3.7 2.9 4.1 2.84 4.1-7.8 9.8a52.34 52.34 0 0 1 2.86 7.5l12.3 2.17.6 4.96.57 4.95zM41 64a23 23 0 1 0 23-23 23 23 0 0 0-23 23z'/%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 64 64' to='27.69 64 64' dur='700ms' repeatCount='indefinite'%3E%3C/animateTransform%3E%3C/g%3E%3C/svg%3E" alt="spinning gear to signify loading"/>
<!-- Add your site or application content here -->
<figcaption class="caption" id="console"></figcaption>
</figure>
<details>
<summary>View unfiltered prediction results</summary>
<ul id="unfiltered"></ul>
<button id="getPredictions" type="button">Get json file of unfiltered predictions</button>
</details>
</main>
<footer role="contentinfo">
<p>Created by <a href="https://twitter.com/jaclark">@jaclark</a> | Source code is available on <a href="https://github.com/jasonclark">GitHub</a> | © Copyright Montana State University (MSU) Library</p>
</footer>
<!-- Load app.js after the content of the page -->
<script src="app.js"></script>
</body>
</html>