-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
180 lines (156 loc) · 5.15 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/webcamjs/1.0.26/webcam.js"></script>
<style>
body {
background: #f0f2f5;
font-family: 'Poppins', sans-serif;
}
.container {
margin-top: 50px;
max-width: 1000px;
background: white;
border-radius: 10px;
padding: 30px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
h2 {
text-align: center;
margin-bottom: 30px;
font-weight: 700;
background: linear-gradient(135deg, #74ebd5, #ACB6E5);
color: transparent;
background-clip: text;
-webkit-background-clip: text;
font-size: 36px;
text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}
.card {
background: #ffffff;
padding: 20px;
margin-bottom: 30px;
border-radius: 10px;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.card label {
font-weight: 600;
color: #333;
}
#camera {
width: 100%;
height: auto;
background-color: #e3e3e3;
border-radius: 10px;
}
.btn-classy {
margin-top: 20px;
font-size: 16px;
padding: 12px 30px;
border-radius: 30px;
border: 2px solid transparent;
background: linear-gradient(135deg, #74ebd5, #ACB6E5);
color: white;
transition: all 0.3s ease;
box-shadow: 0 8px 15px rgba(116, 235, 213, 0.3);
cursor: pointer;
}
.btn-classy:hover {
background: white;
color: #007bff;
border: 2px solid #007bff;
box-shadow: 0 12px 20px rgba(0, 123, 255, 0.4);
}
.btn-container {
display: flex;
justify-content: space-around;
align-items: center;
margin-top: 20px;
}
.result-container {
display: flex;
justify-content: center;
gap: 20px;
margin-top: 30px;
}
#result {
width: 350px;
height: auto;
background-color: #e3e3e3;
border-radius: 10px;
}
.recommended-text {
font-size: 14px;
color: #6c757d;
margin-left: 10px;
display: inline-block;
}
/* Increased font size for the prediction result */
.hand_name {
font-size: 24px;
font-weight: bold;
color: #007bff;
margin-top: 20px;
}
@media (max-width: 768px) {
.result-container {
flex-direction: column;
}
button {
width: 100%;
}
#camera, #result {
width: 100%;
}
}
</style>
</head>
<body>
<div class="container">
<h2>DysCare Prediction System</h2>
<center>
<div class="card">
<label>Webcam View - </label>
<div id="camera"></div>
<script>
window.onload = function() {
Webcam.set({
width: 350,
height: 300,
image_format: "png",
png_quality: 90
});
Webcam.attach('#camera');
};
</script>
<button onclick="take_snapshot()" class="btn-classy">Capture Image</button>
</div>
<div class="result-container">
<div class="card">
<label>Prediction 1 - </label>
<!-- Increased font size for the prediction result -->
<p class="hand_name" id="result_hand_name">[Prediction Appears Here]</p>
</div>
<div class="card">
<label>Snapshot - </label>
<div id="result"></div>
<button class="btn-classy" onclick="predict()">Predict</button>
</div>
</div>
<div class="btn-container">
<div>
<button onclick="q()" class="btn-classy">Questionnaire</button>
<span class="recommended-text">(recommended for better evaluation)</span>
</div>
<button onclick="back()" class="btn-classy">Back</button>
</div>
</center>
</div>
<script src="main.js"></script>
</body>
</html>