-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
78 lines (69 loc) · 2.46 KB
/
index.html
File metadata and controls
78 lines (69 loc) · 2.46 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
<div id='capsule-status' style='font-weight:bold; margin-top:10px;'>
Loading capsule status...
</div>
<script>
async function updateCapsuleStatus() {
const response = await fetch('http://localhost:5000/predict', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ input: 'profit capsule with AI logic' })
});
const data = await response.json();
document.getElementById('capsule-status').innerText =
\Prediction: \ | Confidence: \\;
}
window.onload = updateCapsuleStatus;
</script>
<div id='capsule-status' style='font-weight:bold; margin-top:10px;'>
Loading capsule status...
</div>
<script>
async function updateCapsuleStatus() {
const response = await fetch('http://localhost:5000/predict', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ input: 'profit capsule with AI logic' })
});
const data = await response.json();
document.getElementById('capsule-status').innerText =
\Prediction: \ | Confidence: \\;
}
window.onload = updateCapsuleStatus;
</script>
<div id='capsule-status' style='font-weight:bold; margin-top:10px;'>
Loading capsule status...
</div>
<script>
async function updateCapsuleStatus() {
const response = await fetch('http://localhost:5000/status');
const data = await response.json();
document.getElementById('capsule-status').innerText =
\Status: \ | Uptime: \ | Requests: \\;
}
window.onload = updateCapsuleStatus;
</script>
<div id='capsule-status' style='font-weight:bold; margin-top:10px;'>
Loading capsule status...
</div>
<div id='capsule-predict' style='font-weight:bold; margin-top:10px;'>
Loading prediction...
</div>
<script>
async function updateCapsuleOverlay() {
// /status endpoint
const statusRes = await fetch('http://localhost:5000/status');
const statusData = await statusRes.json();
document.getElementById('capsule-status').innerText =
\Status: \ | Uptime: \ | Requests: \\;
// /predict endpoint
const predictRes = await fetch('http://localhost:5000/predict', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ input: 'profit capsule with AI logic' })
});
const predictData = await predictRes.json();
document.getElementById('capsule-predict').innerText =
\Prediction: \ | Confidence: \\;
}
window.onload = updateCapsuleOverlay;
</script>