-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
64 lines (57 loc) · 2.77 KB
/
index.html
File metadata and controls
64 lines (57 loc) · 2.77 KB
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
<html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]> <html class="no-js"> <![endif]-->
<!--Snake Favicon from https://twemoji.twitter.com/-->
<head>
<meta charset="UTF-8">
<meta name="description" content="Snake Game based on ml5, Train your own images as reference point to an input and play the game once the model is trained">
<meta name="keywords" content="tensorflowjs,mobilenet,ml5">
<meta name="author" content="aguyran">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="/assets/favicon.ico">
<title>Snake</title>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Dancing+Script&family=Open+Sans&display=swap" rel="stylesheet">
<link rel = "stylesheet" href = "styles/style.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.8.0/p5.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.8.0/addons/p5.dom.min.js"></script>
<script src="https://unpkg.com/ml5@0.3.1/dist/ml5.min.js"></script>
</head>
<body>
<nav>
<a href = "https://github.com/ezpz-coders"><img src = "assets/logo.png
" width = "100px" height="auto"></a>
</nav>
<h1>Train Your Inputs</h1>
<div>
<video autoplay = "true" id="videoElement"></video>
</div>
<p>Train Desired Inputs by Showing the Gesture or object and then pressing the button feed more data for better accuracy</p>
<div class = "buttons">
<button id = "upBtn" onclick = "upDir();">Up</button>
<button id = "leftBtn" onclick = "leftDir();">Left</button>
<button id = "downBtn" onclick = "downDir();">Down</button>
<button id = "rightBtn" onclick = "rightDir();">Right</button>
<button id = "trainMdl" onclick = "trainmdl();">Train Model</button>
</div>
<div class = "result">
<div id = "loading-sprite" class = "loader-frame">
<p>Training
<div class="loader">
</div>
</p>
</div>
<h1>Play Snake</h1>
<canvas id = "random" width = "400" height = "400">
</div>
<div class = "footer">
<a href = "https://github.com/ezpz-coders"><p>Contact</a>|<a href = "privacy.html">Privacy Policy</p></a>
<p>Made with ❤ By <a href = "https://github.com/aguyran" target ="_blank"> Aryan Gupta</a>,<a href = "https://github.com/lakshitxd" target ="_blank"> Lakshit Singh</a></p>
</div>
</canvas>
<script src="final.js"></script>
</body>
</html>