forked from tensorflow/tfjs-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
133 lines (108 loc) · 3.5 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>TensorFlow.js: Electron Demo</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link href="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.indigo-pink.min.css">
<script defer src="https://code.getmdl.io/1.3.0/material.min.js"></script>
<style>
body {
margin: 35px;
}
p {
color: gray;
}
#clear-search-results {
float: left;
margin-top: 15px;
}
#main-snackbar-message {
font-size: 13px;
text-align: middle;
}
#progress-container {
height: 14px;
line-height: 14px;
overflow: hidden;
padding: 5px;
white-space: nowrap;
}
.mdl-button {
margin: 10px;
}
.mdl-checkbox {
margin: 10px;
}
.search-result {
display: inline-block;
margin: 10px;
}
.search-result-file-path {
color: rgb(128, 128, 128);
font-size: 70%;
padding: 5px;
}
.search-result-top-k {
color: rgb(80, 80, 80);
font-size: 70%;
padding: 1px;
}
.search-result-thumbnail {
height: 240px;
width: 320px;
margin: 4px;
}
</style>
</head>
<body>
<p><em>Search for images by content using TensorFlow.js</em></p>
<form action="#">
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input
class="mdl-textfield__input"
type="text"
id="target-words"
value="Turtle, ship">
<label class="mdl-textfield__label" for="sample3">What to search for? (Try tiger, burrito, rose, ...)</label>
</div>
</form>
<div>
<button
class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent"
id="files-dialog-button">
<i class="material-icons mdc-button__icon">file_copy</i>
Search in files...
</button>
<button
class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent"
id="directories-dialog-button">
<i class="material-icons mdc-button__icon">folder_open</i>
Search in folders...
</button>
</div>
<div class="mdc-snackbar" id="main-snackbar">
<div class="mdc-snackbar__surface">
<div class="mdc-snackbar__label" role="status" id="main-snackbar-message"></div>
</div>
</div>
<label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect" for="frontend-inference-checkbox">
<input type="checkbox" id="frontend-inference-checkbox" class="mdl-checkbox__input">
<span class="mdl-checkbox__label">Classify images using frontend model (slower)</span>
</label>
<div id="progress-container">
<div class="mdl-typography--text" id="progress-text">Hello</div>
<div id="progress-bar" class="mdl-progress mdl-js-progress mdl-progress__indeterminate"></div>
</div>
<div id="results-section">
<button
class="mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect"
id="clear-search-results">
<i class="material-icons mdc-button__icon">delete</i>
</button>
<div id="search-results"></div>
</div>
<script src="renderer.js"></script>
</body>
</html>