-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpredict.html
More file actions
192 lines (166 loc) · 4.47 KB
/
Copy pathpredict.html
File metadata and controls
192 lines (166 loc) · 4.47 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
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
181
182
183
184
185
186
187
188
189
190
191
192
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Herb Prediction 🔮</title>
<link rel="stylesheet" href="/static/css/style.css">
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;500;700&display=swap" rel="stylesheet">
<script src="/static/js/main.js" defer></script>
<style>
body {
font-family: 'Poppins', sans-serif;
margin: 0;
background: radial-gradient(circle at top, #0c2d1a, #020805);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
color: #eaffea;
}
.container {
width: 100%;
max-width: 700px;
padding: 30px;
}
h1 {
text-align: center;
margin-bottom: 25px;
color: #b6ffcf;
}
.card {
background: #0a1a12;
padding: 30px;
border-radius: 22px;
box-shadow: 0 0 40px rgba(0,255,150,0.18);
border: 1px solid rgba(0,255,150,0.15);
}
p {
color: #caffdd;
font-size: 1rem;
text-align: center;
margin-bottom: 20px;
opacity: 0.9;
}
.sensor-box {
display: flex;
align-items: center;
justify-content: space-between;
background: #07140e;
padding: 14px 16px;
border-radius: 14px;
margin: 14px 0;
border: 1px solid rgba(0,255,150,0.12);
}
.sensor-box span {
font-weight: 500;
}
.sensor-box button {
padding: 7px 16px;
border-radius: 10px;
border: none;
cursor: pointer;
font-weight: 600;
background: linear-gradient(135deg, #00ff9d, #00c47a);
color: #00331f;
transition: all 0.25s ease;
box-shadow: 0 0 10px rgba(0,255,150,0.4);
}
.sensor-box button:hover {
transform: scale(1.07);
box-shadow: 0 0 18px rgba(0,255,150,0.7);
}
.status-ok {
color: #00ff80;
font-weight: 600;
}
.status-fail {
color: #ff6b6b;
font-weight: 600;
}
#predictBtn {
padding: 13px 24px;
border-radius: 16px;
border: none;
font-weight: 600;
cursor: pointer;
background: linear-gradient(135deg, #7dffb2, #00ff9d);
color: #00331f;
margin-right: 15px;
box-shadow: 0 0 20px rgba(0,255,150,0.6);
}
#clearTest {
padding: 13px 24px;
border-radius: 16px;
border: none;
font-weight: 600;
cursor: pointer;
background: #ff5c5c;
color: white;
box-shadow: 0 0 18px rgba(255,90,90,0.6);
}
#result {
background: #07140e;
padding: 20px;
border-radius: 16px;
text-align: center;
color: #eaffea;
font-size: 1.1rem;
font-weight: 600;
margin-top: 22px;
min-height: 80px;
border: 1px solid rgba(0,255,150,0.12);
}
button.back {
margin-top: 25px;
padding: 11px 24px;
border-radius: 16px;
border: none;
cursor: pointer;
background: #00c47a;
color: #002a18;
font-weight: 600;
}
@media (max-width: 500px) {
.sensor-box {
flex-direction: column;
align-items: flex-start;
}
.sensor-box button {
margin-top: 8px;
}
}
</style>
</head>
<body>
<div class="container">
<h1>🔮 Herb Prediction</h1>
<div class="card">
<p>
Collect sensor values from hardware.<br>
If no data is received, system will show ❌.
</p>
<div class="sensor-box">
<span>pH</span>
<button onclick="fetchSensor('ph')">Read</button>
<span id="ph_status" class="status-fail">❌ Not collected</span>
</div>
<div class="sensor-box">
<span>TDS</span>
<button onclick="fetchSensor('tds')">Read</button>
<span id="tds_status" class="status-fail">❌ Not collected</span>
</div>
<div class="sensor-box">
<span>Optical</span>
<button onclick="fetchSensor('optical')">Read</button>
<span id="optical_status" class="status-fail">❌ Not collected</span>
</div>
<div style="text-align:center;margin-top:22px">
<button id="predictBtn" onclick="predict()">🔍 Predict</button>
<button id="clearTest" onclick="clearSensors()">🔄 Clear Test</button>
</div>
<div id="result"></div>
<button class="back" onclick="history.back()">⬅ Back</button>
</div>
</div>
</body>
</html>