|
a |
|
b/templates/heart.html |
|
|
1 |
<!DOCTYPE html> |
|
|
2 |
<html lang="en"> |
|
|
3 |
|
|
|
4 |
<head> |
|
|
5 |
<meta charset="UTF-8"> |
|
|
6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
|
7 |
<title>Heart Disease Predictor</title> |
|
|
8 |
<!-- Bootstrap CSS link --> |
|
|
9 |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" |
|
|
10 |
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" |
|
|
11 |
crossorigin="anonymous"> |
|
|
12 |
<!-- Your custom CSS --> |
|
|
13 |
<style> |
|
|
14 |
body { |
|
|
15 |
font-family: Cambria; |
|
|
16 |
background-image: linear-gradient(#e35656, #e5a569); |
|
|
17 |
height: 100%; |
|
|
18 |
} |
|
|
19 |
|
|
|
20 |
.container { |
|
|
21 |
max-width: 800px; |
|
|
22 |
margin: 0 auto; |
|
|
23 |
padding-top: 50px; |
|
|
24 |
} |
|
|
25 |
|
|
|
26 |
.input-box { |
|
|
27 |
margin-bottom: 15px; |
|
|
28 |
border: 2px solid #000000; |
|
|
29 |
background-color: #f3c2c2; |
|
|
30 |
width: 100%; |
|
|
31 |
padding: 10px; |
|
|
32 |
font-size: 18px; |
|
|
33 |
border-radius: 5px; |
|
|
34 |
} |
|
|
35 |
|
|
|
36 |
.logo { |
|
|
37 |
display: block; |
|
|
38 |
margin: 0 auto; |
|
|
39 |
width: 200px; |
|
|
40 |
height: auto; |
|
|
41 |
margin-bottom: 20px; |
|
|
42 |
} |
|
|
43 |
|
|
|
44 |
.btn-predict { |
|
|
45 |
background-color: #eb554d; |
|
|
46 |
color: #fff; |
|
|
47 |
margin-top: 20px; |
|
|
48 |
padding: 15px 30px; |
|
|
49 |
font-size: 20px; |
|
|
50 |
border-radius: 5px; |
|
|
51 |
width: 100%; |
|
|
52 |
} |
|
|
53 |
|
|
|
54 |
.btn-predict:hover { |
|
|
55 |
background-color: #0056b3; |
|
|
56 |
} |
|
|
57 |
.btn-home { |
|
|
58 |
background-color: #000000; /* Black color */ |
|
|
59 |
color: white; |
|
|
60 |
height: 50px; |
|
|
61 |
width: 100px; |
|
|
62 |
padding: 4px 4px; /* Smaller padding */ |
|
|
63 |
font-size: 26px; /* Smaller font size */ |
|
|
64 |
border-radius: 5px; |
|
|
65 |
margin-top: 1px; |
|
|
66 |
margin-bottom: -32px; |
|
|
67 |
display: block; |
|
|
68 |
margin-left: auto; |
|
|
69 |
margin-right: auto; |
|
|
70 |
text-decoration: none; /* Remove underline */ |
|
|
71 |
text-align: center; |
|
|
72 |
} |
|
|
73 |
|
|
|
74 |
.btn-home:hover { |
|
|
75 |
background-color: #333333; /* Darker shade of black on hover */ |
|
|
76 |
color: white; /* Keep text white on hover */ |
|
|
77 |
text-decoration: none; /* Remove underline on hover */ |
|
|
78 |
} |
|
|
79 |
</style> |
|
|
80 |
</head> |
|
|
81 |
|
|
|
82 |
<body> |
|
|
83 |
<!-- Header --> |
|
|
84 |
<header> |
|
|
85 |
<img src="/static/NEWLOGO.png" alt="Logo" class="logo"> |
|
|
86 |
</header> |
|
|
87 |
<div> |
|
|
88 |
<a href="/" class="btn-home">Home</a> <!-- Link to the home page --> |
|
|
89 |
</div> |
|
|
90 |
|
|
|
91 |
<!-- Main Content --> |
|
|
92 |
<div class="container"> |
|
|
93 |
<h1 class="text-center mb-4">Heart Disease Predictor</h1> |
|
|
94 |
<div class="card mb-4"> |
|
|
95 |
<div class="card-body"> |
|
|
96 |
<form action="/predicth/" method="POST"> |
|
|
97 |
{% csrf_token %} |
|
|
98 |
|
|
|
99 |
<div class="row"> |
|
|
100 |
<div class="col-md-6"> |
|
|
101 |
<div class="form-group"> |
|
|
102 |
<input class="form-control input-box" type="text" name="age" placeholder="Age (in years)"> |
|
|
103 |
</div> |
|
|
104 |
</div> |
|
|
105 |
<div class="col-md-6"> |
|
|
106 |
<div class="form-group"> |
|
|
107 |
<input class="form-control input-box" type="text" name="sex" placeholder="Sex (1 = Male; 0 = Female)"> |
|
|
108 |
</div> |
|
|
109 |
</div> |
|
|
110 |
</div> |
|
|
111 |
<div class="row"> |
|
|
112 |
<div class="col-md-6"> |
|
|
113 |
<div class="form-group"> |
|
|
114 |
<input class="form-control input-box" type="text" name="cp" placeholder="Chest Pain Type"> |
|
|
115 |
</div> |
|
|
116 |
</div> |
|
|
117 |
<div class="col-md-6"> |
|
|
118 |
<div class="form-group"> |
|
|
119 |
<input class="form-control input-box" type="text" name="trestbps" placeholder="Resting Blood Pressure (in mm Hg)"> |
|
|
120 |
</div> |
|
|
121 |
</div> |
|
|
122 |
</div> |
|
|
123 |
<div class="row"> |
|
|
124 |
<div class="col-md-6"> |
|
|
125 |
<div class="form-group"> |
|
|
126 |
<input class="form-control input-box" type="text" name="chol" placeholder="Serum Cholesterol (in mg/dl)"> |
|
|
127 |
</div> |
|
|
128 |
</div> |
|
|
129 |
<div class="col-md-6"> |
|
|
130 |
<div class="form-group"> |
|
|
131 |
<input class="form-control input-box" type="text" name="fbs" placeholder="Fasting Blood Sugar > 120 mg/dl (1 = True; 0 = False)"> |
|
|
132 |
</div> |
|
|
133 |
</div> |
|
|
134 |
</div> |
|
|
135 |
<div class="row"> |
|
|
136 |
<div class="col-md-6"> |
|
|
137 |
<div class="form-group"> |
|
|
138 |
<input class="form-control input-box" type="text" name="restecg" placeholder="Resting Electrocardiograph Results"> |
|
|
139 |
</div> |
|
|
140 |
</div> |
|
|
141 |
<div class="col-md-6"> |
|
|
142 |
<div class="form-group"> |
|
|
143 |
<input class="form-control input-box" type="text" name="thalach" placeholder="Maximum Heart Rate Achieved"> |
|
|
144 |
</div> |
|
|
145 |
</div> |
|
|
146 |
</div> |
|
|
147 |
<div class="row"> |
|
|
148 |
<div class="col-md-6"> |
|
|
149 |
<div class="form-group"> |
|
|
150 |
<input class="form-control input-box" type="text" name="exang" placeholder="Exercise Induced Angina (1 = Yes; 0 = No)"> |
|
|
151 |
</div> |
|
|
152 |
</div> |
|
|
153 |
<div class="col-md-6"> |
|
|
154 |
<div class="form-group"> |
|
|
155 |
<input class="form-control input-box" type="text" name="oldpeak" placeholder="ST Depression Induced by Exercise Relative to Rest"> |
|
|
156 |
</div> |
|
|
157 |
</div> |
|
|
158 |
</div> |
|
|
159 |
<div class="row"> |
|
|
160 |
<div class="col-md-6"> |
|
|
161 |
<div class="form-group"> |
|
|
162 |
<input class="form-control input-box" type="text" name="slope" placeholder="The Slope of the Peak Exercise ST Segment"> |
|
|
163 |
</div> |
|
|
164 |
</div> |
|
|
165 |
<div class="col-md-6"> |
|
|
166 |
<div class="form-group"> |
|
|
167 |
<input class="form-control input-box" type="text" name="ca" placeholder="Number of Major Vessels (0-3) Colored by Fluoroscopy"> |
|
|
168 |
</div> |
|
|
169 |
</div> |
|
|
170 |
</div> |
|
|
171 |
<div class="row"> |
|
|
172 |
<div class="col-md-3"></div> |
|
|
173 |
<div class="col-md-6"> |
|
|
174 |
<div class="form-group"> |
|
|
175 |
<input class="form-control input-box" type="text" name="thal" placeholder="Thal: 1 = Normal; 2 = Fixed Defect; 3 = Reversible Defect"> |
|
|
176 |
</div> |
|
|
177 |
</div> |
|
|
178 |
</div> |
|
|
179 |
<input class="btn btn-info btn-block btn-predict" type="submit" value="Predict"> |
|
|
180 |
</form> |
|
|
181 |
</div> |
|
|
182 |
</div> |
|
|
183 |
</div> |
|
|
184 |
</body> |
|
|
185 |
|
|
|
186 |
</html> |