Spaces:
Runtime error
Runtime error
Update templates/database.html
Browse files- templates/database.html +30 -3
templates/database.html
CHANGED
|
@@ -5,6 +5,9 @@
|
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>RetiCheck | Patient Database</title>
|
| 7 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
|
|
|
|
|
|
|
|
|
| 8 |
<style>
|
| 9 |
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }
|
| 10 |
body { background: #0f172a; color: white; padding: 30px; text-align: center; }
|
|
@@ -23,10 +26,8 @@
|
|
| 23 |
.btn-back { display: inline-block; padding: 12px 20px; background: #334155; color: white; text-decoration: none; border-radius: 10px; transition: 0.3s; font-weight: bold; }
|
| 24 |
.btn-back:hover { background: #475569; }
|
| 25 |
|
| 26 |
-
/* PUDHU CODE: எக்செல் பட்டன் டிசைன் 👇 */
|
| 27 |
.btn-export { display: inline-block; padding: 12px 20px; background: #10b981; color: white; text-decoration: none; border-radius: 10px; font-weight: bold; margin-right: 15px; transition: 0.3s; box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3); }
|
| 28 |
.btn-export:hover { background: #059669; transform: translateY(-2px); }
|
| 29 |
-
/* PUDHU CODE END 👆 */
|
| 30 |
</style>
|
| 31 |
</head>
|
| 32 |
<body>
|
|
@@ -35,6 +36,9 @@
|
|
| 35 |
<h2>🏥 Patient Prediction Database</h2>
|
| 36 |
<p style="color: #94a3b8; margin-bottom: 20px;">History of all retinal scans analyzed by AI.</p>
|
| 37 |
|
|
|
|
|
|
|
|
|
|
| 38 |
<table>
|
| 39 |
<thead>
|
| 40 |
<tr>
|
|
@@ -66,5 +70,28 @@
|
|
| 66 |
</div>
|
| 67 |
</div>
|
| 68 |
|
| 69 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
</html>
|
|
|
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>RetiCheck | Patient Database</title>
|
| 7 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 8 |
+
|
| 9 |
+
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
| 10 |
+
|
| 11 |
<style>
|
| 12 |
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }
|
| 13 |
body { background: #0f172a; color: white; padding: 30px; text-align: center; }
|
|
|
|
| 26 |
.btn-back { display: inline-block; padding: 12px 20px; background: #334155; color: white; text-decoration: none; border-radius: 10px; transition: 0.3s; font-weight: bold; }
|
| 27 |
.btn-back:hover { background: #475569; }
|
| 28 |
|
|
|
|
| 29 |
.btn-export { display: inline-block; padding: 12px 20px; background: #10b981; color: white; text-decoration: none; border-radius: 10px; font-weight: bold; margin-right: 15px; transition: 0.3s; box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3); }
|
| 30 |
.btn-export:hover { background: #059669; transform: translateY(-2px); }
|
|
|
|
| 31 |
</style>
|
| 32 |
</head>
|
| 33 |
<body>
|
|
|
|
| 36 |
<h2>🏥 Patient Prediction Database</h2>
|
| 37 |
<p style="color: #94a3b8; margin-bottom: 20px;">History of all retinal scans analyzed by AI.</p>
|
| 38 |
|
| 39 |
+
<div style="width: 100%; max-width: 320px; margin: 0 auto 30px auto; background: rgba(0,0,0,0.2); padding: 20px; border-radius: 20px; border: 1px solid #334155;">
|
| 40 |
+
<canvas id="diseaseChart"></canvas>
|
| 41 |
+
</div>
|
| 42 |
<table>
|
| 43 |
<thead>
|
| 44 |
<tr>
|
|
|
|
| 70 |
</div>
|
| 71 |
</div>
|
| 72 |
|
| 73 |
+
<script>
|
| 74 |
+
const ctx = document.getElementById('diseaseChart').getContext('2d');
|
| 75 |
+
const diseaseChart = new Chart(ctx, {
|
| 76 |
+
type: 'doughnut',
|
| 77 |
+
data: {
|
| 78 |
+
labels: ['Normal (Safe)', 'Diabetic (Urgent)', 'Glaucoma (Referral)'],
|
| 79 |
+
datasets: [{
|
| 80 |
+
// பைதான் எண்ணி கொடுத்த நம்பர்களை இங்கே போடுகிறோம்
|
| 81 |
+
data: [{{ n_count }}, {{ d_count }}, {{ g_count }}],
|
| 82 |
+
backgroundColor: ['#10b981', '#ef4444', '#f59e0b'],
|
| 83 |
+
borderWidth: 2,
|
| 84 |
+
borderColor: '#0f172a',
|
| 85 |
+
hoverOffset: 10
|
| 86 |
+
}]
|
| 87 |
+
},
|
| 88 |
+
options: {
|
| 89 |
+
responsive: true,
|
| 90 |
+
plugins: {
|
| 91 |
+
legend: { position: 'bottom', labels: { color: '#cbd5e1', font: { family: 'Poppins' } } }
|
| 92 |
+
}
|
| 93 |
+
}
|
| 94 |
+
});
|
| 95 |
+
</script>
|
| 96 |
+
</body>
|
| 97 |
</html>
|