Spaces:
Sleeping
Sleeping
File size: 5,126 Bytes
faabc58 |
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 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CKD Prediction</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: aquamarine;
padding: 20px;
}
.container {
width: 700px;
margin: auto;
background: #fff;
padding: 30px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h2 {
text-align: center;
color: #333;
}
.form-group {
margin-bottom: 15px;
}
label {
font-weight: bold;
display: block;
margin-bottom: 5px;
}
input, select {
width: 100%;
padding: 8px;
font-size: 14px;
}
.btn {
width: 100%;
padding: 10px;
background-color: #28a745;
border: none;
color: white;
font-size: 16px;
cursor: pointer;
border-radius: 5px;
}
.btn:hover {
background-color: #218838;
}
.result {
font-size: large;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
color: #333;
background-color: #f8f9fa;
margin-top: 20px;
font-size: 18px;
font-weight: bold;
text-align: center;
}
</style>
</head>
<body>
<div class="container">
<h2>CKD Prediction Form</h2>
<form method="post">
<!-- Age -->
<div class="form-group">
<label>Age</label>
<input type="number" name="age" min="0" max="100" placeholder="e.g., 60" required>
</div>
<!-- Blood Pressure -->
<div class="form-group">
<label>Blood Pressure (mmHg)</label>
<input type="number" name="blood_pressure" min="40" max="200" placeholder="e.g., 80" required>
</div>
<!-- Specific Gravity -->
<div class="form-group">
<label>Specific Gravity</label>
<select name="specific_gravity">
<option value="1.005">1.005</option>
<option value="1.010">1.010</option>
<option value="1.015">1.015</option>
<option value="1.020" selected>1.020</option>
<option value="1.025">1.025</option>
</select>
</div>
<!-- Albumin -->
<div class="form-group">
<label>Albumin (0β5)</label>
<input type="number" name="albumin" min="0" max="5" placeholder="e.g., 2" required>
</div>
<!-- Sugar -->
<div class="form-group">
<label>Sugar (0β5)</label>
<input type="number" name="sugar" min="0" max="5" placeholder="e.g., 1" required>
</div>
<!-- Binary Dropdowns -->
{% for field in [
('red_blood_cells', 'Red Blood Cells (Normal=1 / Abnormal=0)'),
('pus_cell', 'Pus Cell (Normal=1 / Abnormal=0)'),
('pus_cell_clumps', 'Pus Cell Clumps (Yes=1 / No=0)'),
('bacteria', 'Bacteria (Yes=1 / No=0)'),
('hypertension', 'Hypertension (Yes=1 / No=0)'),
('diabetes_mellitus', 'Diabetes Mellitus (Yes=1 / No=0)'),
('coronary_artery_disease', 'Coronary Artery Disease (Yes=1 / No=0)'),
('appetite', 'Appetite (Good=1 / Poor=0)'),
('peda_edema', 'Pedal Edema (Yes=1 / No=0)'),
('aanemia', 'Anaemia (Yes=1 / No=0)')
] %}
<div class="form-group">
<label>{{ field[1] }}</label>
<select name="{{ field[0] }}">
<option value="1">Yes / Normal / Good</option>
<option value="0">No / Abnormal / Poor</option>
</select>
</div>
{% endfor %}
<!-- Numeric Inputs -->
{% for field, label, minval, maxval, placeholder in [
('blood_glucose_random', 'Blood Glucose Random (mg/dL)', 50, 500, 150),
('blood_urea', 'Blood Urea (mg/dL)', 5, 300, 44),
('serum_creatinine', 'Serum Creatinine (mg/dL)', 0.5, 15, 1.2),
('sodium', 'Sodium (mEq/L)', 120, 160, 135),
('potassium', 'Potassium (mEq/L)', 2.5, 7.5, 4.6),
('haemoglobin', 'Haemoglobin (g/dL)', 3, 20, 12),
('packed_cell_volume', 'Packed Cell Volume (%)', 15, 55, 38),
('white_blood_cell_count', 'WBC Count (cells/uL)', 3000, 25000, 8000),
('red_blood_cell_count', 'RBC Count (millions/uL)', 2.5, 6.5, 4.5)
] %}
<div class="form-group">
<label>{{ label }}</label>
<input type="number" name="{{ field }}" min="{{ minval }}" max="{{ maxval }}" step="any" placeholder="e.g., {{ placeholder }}" required>
</div>
{% endfor %}
<!-- Submit Button -->
<button type="submit" class="btn">Predict</button>
</form>
{% if result %}
<div class="result">{{ result }}</div>
{% endif %}
</div>
</body>
</html> |