Spaces:
Runtime error
Runtime error
Download templates/database.html from vaithi663/RetiCheck-AI: direct link, hf CLI and curl.
- Browser
- Download file 4.4 kB
-
https://huggingface.co/spaces/vaithi663/RetiCheck-AI/resolve/main/templates/database.html
- Command line
-
hf download hf://spaces/vaithi663/RetiCheck-AI/templates/database.html
-
curl -L -o database.html https://huggingface.co/spaces/vaithi663/RetiCheck-AI/resolve/main/templates/database.html
4.4 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>RetiCheck | Patient Database</title> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | |
| <style> | |
| * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; } | |
| body { background: #0f172a; color: white; padding: 30px; text-align: center; } | |
| .container { max-width: 900px; margin: 0 auto; background: rgba(255, 255, 255, 0.03); padding: 30px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.1); } | |
| h2 { color: #00f2fe; margin-bottom: 20px; } | |
| table { width: 100%; border-collapse: collapse; margin-top: 20px; } | |
| th, td { padding: 15px; border-bottom: 1px solid #334155; text-align: left; } | |
| th { background: #1e293b; color: #94a3b8; } | |
| tr:hover { background: rgba(255,255,255,0.05); } | |
| .safe { color: #10b981; font-weight: bold; } | |
| .urgent { color: #ef4444; font-weight: bold; } | |
| .btn-back { display: inline-block; padding: 12px 20px; background: #334155; color: white; text-decoration: none; border-radius: 10px; transition: 0.3s; font-weight: bold; } | |
| .btn-back:hover { background: #475569; } | |
| .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); } | |
| .btn-export:hover { background: #059669; transform: translateY(-2px); } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <h2>🏥 Patient Prediction Database</h2> | |
| <p style="color: #94a3b8; margin-bottom: 20px;">History of all retinal scans analyzed by AI.</p> | |
| <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;"> | |
| <canvas id="diseaseChart"></canvas> | |
| </div> | |
| <table> | |
| <thead> | |
| <tr> | |
| <th>Date & Time</th> | |
| <th>Predicted Disease</th> | |
| <th>AI Confidence</th> | |
| <th>Triage Status</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| {% for row in records %} | |
| <tr> | |
| <td>{{ row[1] }}</td> | |
| <td>{{ row[2] }}</td> | |
| <td>{{ row[3] }}</td> | |
| <td class="{% if row[4] == 'SAFE' %}safe{% else %}urgent{% endif %}">{{ row[4] }}</td> | |
| </tr> | |
| {% else %} | |
| <tr> | |
| <td colspan="4" style="text-align: center; color: #94a3b8;">No patient records found yet. Scan an image first!</td> | |
| </tr> | |
| {% endfor %} | |
| </tbody> | |
| </table> | |
| <div style="margin-top: 30px;"> | |
| <a href="/export_csv" class="btn-export"><i class="fa-solid fa-file-excel"></i> Download Excel Report</a> | |
| <a href="/upload" class="btn-back">🔙 Back to Scanner</a> | |
| </div> | |
| </div> | |
| <script> | |
| const ctx = document.getElementById('diseaseChart').getContext('2d'); | |
| const diseaseChart = new Chart(ctx, { | |
| type: 'doughnut', | |
| data: { | |
| labels: ['Normal (Safe)', 'Diabetic (Urgent)', 'Glaucoma (Referral)'], | |
| datasets: [{ | |
| // பைதான் எண்ணி கொடுத்த நம்பர்களை இங்கே போடுகிறோம் | |
| data: [{{ n_count }}, {{ d_count }}, {{ g_count }}], | |
| backgroundColor: ['#10b981', '#ef4444', '#f59e0b'], | |
| borderWidth: 2, | |
| borderColor: '#0f172a', | |
| hoverOffset: 10 | |
| }] | |
| }, | |
| options: { | |
| responsive: true, | |
| plugins: { | |
| legend: { position: 'bottom', labels: { color: '#cbd5e1', font: { family: 'Poppins' } } } | |
| } | |
| } | |
| }); | |
| </script> | |
| </body> | |
| </html> |