bhaglepravesh commited on
Commit
dfd8979
1 Parent(s): 2f37eb5

Upload Predict Disease.html

Browse files
Files changed (1) hide show
  1. Predict Disease.html +74 -19
Predict Disease.html CHANGED
@@ -22,7 +22,8 @@
22
  text-align: center;
23
  color: #007bff;
24
  }
25
- input[type="number"] {
 
26
  width: 100%;
27
  padding: 10px;
28
  margin-bottom: 15px;
@@ -52,21 +53,75 @@
52
 
53
  <div class="container">
54
  <h2>Heart Disease Risk Predictor</h2>
55
- <input type="text" id="age" placeholder="Age"><br>
56
- <input type="text" id="education" placeholder="Education Level"><br>
57
- <input type="text" id="Gender" placeholder="Gender 1 for M, 0 for F"><br>
58
- <input type="text" id="issmoking" placeholder="Smoking 1 for YES, 0 for NO"><br>
59
- <input type="text" id="cigsPerDay" placeholder="Cigarettes Per Day"><br>
60
- <input type="text" id="BPMeds" placeholder="BP Medications"><br>
61
- <input type="text" id="prevalentStroke" placeholder="Prevalent Stroke"><br>
62
- <input type="text" id="prevalentHyp" placeholder="Prevalent Hypertension"><br>
63
- <input type="text" id="diabetes" placeholder="Diabetes 1 for YES, 0 for NO"><br>
64
- <input type="text" id="totChol" placeholder="Total Cholesterol"><br>
65
- <input type="text" id="sysBP" placeholder="Systolic Blood Pressure"><br>
66
- <input type="text" id="diaBP" placeholder="Diastolic Blood Pressure"><br>
67
- <input type="text" id="BMI" placeholder="Body Mass Index"><br>
68
- <input type="text" id="heartRate" placeholder="Heart Rate"><br>
69
- <input type="text" id="glucose" placeholder="Glucose"><br>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  <button onclick="predictRisk()">Predict Risk</button>
71
  <div id="result"></div>
72
  </div>
@@ -74,10 +129,10 @@
74
  <script>
75
  function predictRisk() {
76
  // Collect input values
77
- var age = parseFloat(document.getElementById('age').value);
78
  var education = parseFloat(document.getElementById('education').value);
79
- var Gender = parseFloat(document.getElementById('Gender').value);
80
- var issmoking = parseFloat(document.getElementById('issmoking').value);
81
  var cigsPerDay = parseFloat(document.getElementById('cigsPerDay').value);
82
  var BPMeds = parseFloat(document.getElementById('BPMeds').value);
83
  var prevalentStroke = parseFloat(document.getElementById('prevalentStroke').value);
 
22
  text-align: center;
23
  color: #007bff;
24
  }
25
+ input[type="number"],
26
+ select {
27
  width: 100%;
28
  padding: 10px;
29
  margin-bottom: 15px;
 
53
 
54
  <div class="container">
55
  <h2>Heart Disease Risk Predictor</h2>
56
+ <label for="ageInput">Age:</label>
57
+ <input type="text" id="ageInput" placeholder="Enter Age"><br>
58
+
59
+ <label for="education">Education Level:</label>
60
+ <select id="education">
61
+ <option value="1">Primary School</option>
62
+ <option value="2">High School</option>
63
+ <option value="3">Bachelor's Degree</option>
64
+ <option value="4">Master's Degree or Above</option>
65
+ </select><br>
66
+
67
+ <label for="gender">Gender:</label>
68
+ <select id="gender">
69
+ <option value="1">Male</option>
70
+ <option value="0">Female</option>
71
+ <option value="2">Other</option>
72
+ </select><br>
73
+
74
+ <label for="issmoking">Smoking:</label>
75
+ <select id="issmoking">
76
+ <option value="1">Yes</option>
77
+ <option value="0">No</option>
78
+ </select><br>
79
+
80
+ <label for="cigsPerDay">Cigarettes Per Day:</label>
81
+ <input type="text" id="cigsPerDay" placeholder="Enter Cigarettes Per Day"><br>
82
+
83
+ <label for="BPMeds">BP Medications:</label>
84
+ <select id="BPMeds">
85
+ <option value="1">Yes</option>
86
+ <option value="0">No</option>
87
+ </select><br>
88
+
89
+ <label for="prevalentStroke">Prevalent Stroke:</label>
90
+ <select id="prevalentStroke">
91
+ <option value="1">Yes</option>
92
+ <option value="0">No</option>
93
+ </select><br>
94
+
95
+ <label for="prevalentHyp">Prevalent Hypertension:</label>
96
+ <select id="prevalentHyp">
97
+ <option value="1">Yes</option>
98
+ <option value="0">No</option>
99
+ </select><br>
100
+
101
+ <label for="diabetes">Diabetes:</label>
102
+ <select id="diabetes">
103
+ <option value="1">Yes</option>
104
+ <option value="0">No</option>
105
+ </select><br>
106
+
107
+ <label for="totChol">Total Cholesterol:</label>
108
+ <input type="text" id="totChol" placeholder="Enter Total Cholesterol"><br>
109
+
110
+ <label for="sysBP">Systolic Blood Pressure:</label>
111
+ <input type="text" id="sysBP" placeholder="Enter Systolic Blood Pressure"><br>
112
+
113
+ <label for="diaBP">Diastolic Blood Pressure:</label>
114
+ <input type="text" id="diaBP" placeholder="Enter Diastolic Blood Pressure"><br>
115
+
116
+ <label for="BMI">Body Mass Index:</label>
117
+ <input type="text" id="BMI" placeholder="Enter Body Mass Index"><br>
118
+
119
+ <label for="heartRate">Heart Rate:</label>
120
+ <input type="text" id="heartRate" placeholder="Enter Heart Rate"><br>
121
+
122
+ <label for="glucose">Glucose:</label>
123
+ <input type="text" id="glucose" placeholder="Enter Glucose"><br>
124
+
125
  <button onclick="predictRisk()">Predict Risk</button>
126
  <div id="result"></div>
127
  </div>
 
129
  <script>
130
  function predictRisk() {
131
  // Collect input values
132
+ var age = parseFloat(document.getElementById('ageInput').value);
133
  var education = parseFloat(document.getElementById('education').value);
134
+ var gender = parseFloat(document.getElementById('gender').value);
135
+ var smoking = parseFloat(document.getElementById('issmoking').value);
136
  var cigsPerDay = parseFloat(document.getElementById('cigsPerDay').value);
137
  var BPMeds = parseFloat(document.getElementById('BPMeds').value);
138
  var prevalentStroke = parseFloat(document.getElementById('prevalentStroke').value);