Spaces:
Sleeping
Sleeping
File size: 9,015 Bytes
5dea356 e05bcd6 5dea356 98dd8dd 5dea356 e05bcd6 5dea356 e05bcd6 5dea356 e05bcd6 5dea356 e05bcd6 5dea356 e05bcd6 5dea356 e05bcd6 5dea356 e05bcd6 5dea356 e05bcd6 5dea356 e05bcd6 5dea356 e05bcd6 5dea356 e05bcd6 5dea356 e05bcd6 5dea356 | 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 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Diabetes Prediction Model</title>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
<link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap" rel="stylesheet">
</head>
<body>
<div class="container">
<header>
<h1>BetaCell AI 🩺 </h1>
<p>Diabetes Risk Prediction Model</p>
</header>
<div class="main-content">
<!-- The Form -->
<div class="form-section">
<form id="predictionForm" onsubmit="event.preventDefault(); makePrediction();">
<div class="form-grid">
<!-- 1. Pregnancies -->
<div class="input-group">
<label class="input-label">Pregnancies</label>
<div class="number-input-container">
<input type="number" id="Pregnancies" class="number-input" value="3" min="0" max="17" step="1" inputmode="numeric">
<div class="controls">
<button class="control-btn decrease-btn" type="button"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M3 8h10" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg></button>
<div class="separator"></div>
<button class="control-btn increase-btn" type="button"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M8 3v10M3 8h10" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg></button>
</div>
</div>
</div>
<!-- 2. Glucose -->
<div class="input-group">
<label class="input-label">Glucose (mg/dL)</label>
<div class="number-input-container">
<input type="number" id="Glucose" class="number-input" value="117" min="0" max="199" step="1" inputmode="numeric">
<div class="controls">
<button class="control-btn decrease-btn" type="button"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M3 8h10" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg></button>
<div class="separator"></div>
<button class="control-btn increase-btn" type="button"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M8 3v10M3 8h10" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg></button>
</div>
</div>
</div>
<!-- 3. Blood Pressure -->
<div class="input-group">
<label class="input-label">Blood Pressure (mm Hg)</label>
<div class="number-input-container">
<input type="number" id="BloodPressure" class="number-input" value="72" min="0" max="122" step="1" inputmode="numeric">
<div class="controls">
<button class="control-btn decrease-btn" type="button"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M3 8h10" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg></button>
<div class="separator"></div>
<button class="control-btn increase-btn" type="button"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M8 3v10M3 8h10" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg></button>
</div>
</div>
</div>
<!-- 4. Skin Thickness -->
<div class="input-group">
<label class="input-label">Skin Thickness (mm)</label>
<div class="number-input-container">
<input type="number" id="SkinThickness" class="number-input" value="23" min="0" max="99" step="1" inputmode="numeric">
<div class="controls">
<button class="control-btn decrease-btn" type="button"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M3 8h10" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg></button>
<div class="separator"></div>
<button class="control-btn increase-btn" type="button"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M8 3v10M3 8h10" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg></button>
</div>
</div>
</div>
<!-- 5. Insulin -->
<div class="input-group">
<label class="input-label">Insulin (mu U/ml)</label>
<div class="number-input-container">
<input type="number" id="Insulin" class="number-input" value="30" min="0" max="846" step="1" inputmode="numeric">
<div class="controls">
<button class="control-btn decrease-btn" type="button"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M3 8h10" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg></button>
<div class="separator"></div>
<button class="control-btn increase-btn" type="button"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M8 3v10M3 8h10" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg></button>
</div>
</div>
</div>
<!-- 6. BMI -->
<div class="input-group">
<label class="input-label">
<a href="https://www.calculator.net/bmi-calculator.html" target="_blank" class="external-link">BMI</a>
</label>
<div class="number-input-container">
<input type="number" id="BMI" class="number-input" value="32.0" min="0" max="67.1" step="0.1" inputmode="decimal">
<div class="controls">
<button class="control-btn decrease-btn" type="button"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M3 8h10" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg></button>
<div class="separator"></div>
<button class="control-btn increase-btn" type="button"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M8 3v10M3 8h10" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg></button>
</div>
</div>
</div>
<!-- 7. Diabetes Pedigree Function -->
<div class="input-group">
<label class="input-label">Diabetes Pedigree</label>
<div class="number-input-container">
<input type="number" id="DiabetesPedigreeFunction" class="number-input" value="0.372" min="0.078" max="2.42" step="0.001" inputmode="decimal">
<div class="controls">
<button class="control-btn decrease-btn" type="button"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M3 8h10" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg></button>
<div class="separator"></div>
<button class="control-btn increase-btn" type="button"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M8 3v10M3 8h10" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg></button>
</div>
</div>
</div>
<!-- 8. Age -->
<div class="input-group">
<label class="input-label">Age (Years)</label>
<div class="number-input-container">
<input type="number" id="Age" class="number-input" value="29" min="21" max="81" step="1" inputmode="numeric">
<div class="controls">
<button class="control-btn decrease-btn" type="button"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M3 8h10" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg></button>
<div class="separator"></div>
<button class="control-btn increase-btn" type="button"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M8 3v10M3 8h10" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg></button>
</div>
</div>
</div>
</div>
<button type="submit" class="submit-btn">Run Prediction</button>
</form>
</div>
<!-- Results -->
<div class="result-section" id="resultCard">
<div class="placeholder-text">
<div style="font-size: 3rem; margin-bottom: 10px;">⚡</div>
<h3>Ready to Predict</h3>
<p>Enter patient vitals and click Run Prediction.</p>
</div>
</div>
</div>
</div>
<script src="{{ url_for('static', filename='script.js') }}"></script>
</body>
</html> |