-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·66 lines (62 loc) · 2.7 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Linear Regression Model</title>
<!-- Import TensorFlow.js -->
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/[email protected]/dist/tf.min.js"></script>
<!-- Import tfjs-vis for visualization-->
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/[email protected]/dist/tfjs-vis.umd.min.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<div>
<h1>Linear regression model - Demo using Neural Networks</h1><br><br>
</div>
<hr color="#aeccf3" size="4" width="100%">
<div>
<input type="button" class="button" value="Open visor" onclick="openVisor();" />
<input type="button" class="button" value="Restart" onclick="location.reload();" /><br>
</div>
<hr color="#aeccf3" size="4" width="100%">
<div>
<div class="user-input">
URL json data:
<input type="text" id="url-json-data"
value="https://static.platzi.com/media/public/uploads/datos-entrenamiento_15cd99ce-3561-494e-8f56-9492d4e86438.json" /><br>
X variable: <input type="text" id="data-x-variable" placeholder="e.g. number of rooms"
value="NumeroDeCuartosPromedio" />
Y variable: <input type="text" id="data-y-variable" placeholder="e.g. price of the house" value="Precio" />
</div>
<input type="button" class="button" value="Load and show data" onclick="showData();" /><br><br>
</div>
<hr color="#aeccf3" size="4" width="100%">
<div>
<input type="button" class="button" value="Start training" onclick="startTraining();" />
<input type="button" class="button" value="Stop training" onclick="stopTraining=true;" />
<input type="button" class="button" value="Save model" onclick="saveModel();" /><br>
</div>
<hr color="#aeccf3" size="4" width="100%">
<div>
<input type="button" class="button" value="See inference curve" onclick="seeInferenceCurve();" /><br>
</div>
<hr color="#aeccf3" size="4" width="100%">
<div>
<div class="user-input">
You can load your model if you have one previously trained to see the inference curve. The model is composed of
two files:<br><br>
Model architecture (json file):<input type="file" id="upload-json" />
Trained weights (BIN file):<input type="file" id="upload-weights" /><br>
</div>
<input type="button" class="button" value="Load model" onclick="loadModel();" /><br><br>
</div>
</div>
<div id="notification">
<p></p>
</div>
<script src="script.js"></script>
</body>
</html>