Skip to content

Commit e69946d

Browse files
Merge pull request #158 from sujoy-coder/issue_62
resolve Issue 62
2 parents d535ab1 + 153a651 commit e69946d

File tree

5 files changed

+156
-50
lines changed

5 files changed

+156
-50
lines changed

static/style.css

+9
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,15 @@ font-weight: 300;
113113
max-width: 40rem;
114114
}
115115

116+
.lb-lg {
117+
font-size: 20px;
118+
}
119+
120+
121+
.container-castome{
122+
width: 60%;
123+
}
124+
116125
/* movede from layout to here */
117126
.footer {
118127
background-color: rgb(233, 231, 231);

templates/d_result.html

+11-9
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
<br><br>
55
<div class="container mb-5 pb-5 ">
66
<h1 class="text-center">Diabetes Prediction Result</h1>
7-
8-
{% if prediction==1 %}
9-
<h1>Prediction: <span class='danger'>Oops! You have DIABETES.</span></h1>
10-
<img class="gif" src="{{ url_for('static', filename='diabetes.jpg') }}" alt="Diabetes Image">
11-
{% elif prediction==0 %}
12-
<h1>Prediction: <span class='safe'>Great! You DON'T have diabetes.</span></h1>
13-
<img class="gif1" src="{{ url_for('static', filename='no-diabetes.gif') }}" alt="Not Diabetes Image">
14-
{% endif %}
15-
</div>
7+
</div>
8+
<!-- Result -->
9+
<div class="text-center">
10+
{% if prediction==1 %}
11+
<h1>Prediction: <span class='danger'>Oops! You have DIABETES.</span></h1>
12+
<img class="gif" src="{{ url_for('static', filename='diabetes.jpg') }}" alt="Diabetes Image">
13+
{% elif prediction==0 %}
14+
<h1>Prediction: <span class='safe'>Great! You DON'T have diabetes.</span></h1>
15+
<img class="gif1" src="{{ url_for('static', filename='no-diabetes.gif') }}" alt="Not Diabetes Image">
16+
{% endif %}
17+
</div>
1618
{% endblock %}

templates/diabetes.html

+54-16
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,58 @@
22

33
{% block body %}
44
<br>
5-
<div class="container px-2 col-lg-6 col-sm-12">
6-
<h1 class="text-center">Diabetes Prediction</h1>
7-
<!-- Text Area -->
8-
<form action="{{ url_for('predict_diabetes') }}" method="POST">
9-
<input class="form-input" type="text" name="pregnancies" placeholder="Number of Pregnancies eg. 0" required><br>
10-
<input class="form-input" type="text" name="glucose" placeholder="Glucose (mg/dL) eg. 80" required><br>
11-
<input class="form-input" type="text" name="bloodpressure" placeholder="Blood Pressure (mmHg) eg. 80" required><br>
12-
<input class="form-input" type="text" name="skinthickness" placeholder="Skin Thickness (mm) eg. 20" required><br>
13-
<input class="form-input" type="text" name="insulin" placeholder="Insulin Level (IU/mL) eg. 80" required><br>
14-
<input class="form-input" type="text" name="bmi" placeholder="Body Mass Index (kg/m²) eg. 23.1" required><br>
15-
<input class="form-input" type="text" name="dpf" placeholder="Diabetes Pedigree Function eg. 0.52" required><br>
16-
<input class="form-input" type="text" name="age" placeholder="Age (years) eg. 34" required><br>
17-
18-
<input type="submit" class="my-cta-button" value="Predict">
19-
</form>
5+
<div class="container">
6+
<h1 class="text-center mb-2 pb-2"><u>Diabetes Prediction</u></h1>
7+
8+
<!-- Text Area -->
9+
<div class="container-castome mx-auto">
10+
<form action="{{ url_for('predict_diabetes') }}" method="POST">
11+
<div class="form-group">
12+
<label class="lb-lg">Number of Pregnancies</label>
13+
<input type="text" class="form-control" name="pregnancies" placeholder="Number of Pregnancies eg. 0">
14+
</div>
15+
16+
<div class="form-group">
17+
<label class="lb-lg">Glucose</label>
18+
<input type="text" class="form-control" name="glucose" placeholder="Glucose (mg/dL) eg. 80">
19+
</div>
20+
21+
<div class="form-group">
22+
<label class="lb-lg">Blood Pressure</label>
23+
<input type="text" class="form-control" name="bloodpressure" placeholder="Blood Pressure (mmHg) eg. 80">
24+
</div>
25+
26+
<div class="form-group">
27+
<label class="lb-lg">Skin Thickness</label>
28+
<input type="text" class="form-control" name="skinthickness" placeholder="Skin Thickness (mm) eg. 20">
29+
</div>
30+
31+
<div class="form-group">
32+
<label class="lb-lg">Insulin Level</label>
33+
<input type="text" class="form-control" name="insulin" placeholder="Insulin Level (IU/mL) eg. 80">
34+
</div>
35+
36+
<div class="form-group">
37+
<label class="lb-lg">Body Mass Index</label>
38+
<input type="text" class="form-control" name="bmi" placeholder="Body Mass Index (kg/m²) eg. 23.1">
39+
</div>
40+
41+
<div class="form-group">
42+
<label class="lb-lg">Diabetes Pedigree Function</label>
43+
<input type="text" class="form-control" name="dpf" placeholder="Diabetes Pedigree Function eg. 0.52">
44+
</div>
45+
46+
<div class="form-group">
47+
<label class="lb-lg">Age</label>
48+
<input type="text" class="form-control" name="age" placeholder="Age (years) eg. 34">
49+
</div>
50+
51+
52+
<div class="text-center mb-5 pb-4">
53+
<input type="submit" class="my-cta-button" value="Predict">
54+
</div>
55+
</form>
2056
</div>
21-
{% endblock %}
57+
</div>
58+
{% endblock %}
59+

templates/h_result.html

+11-8
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@
44
<br><br>
55
<div class="container mb-5 pb-5">
66
<h1 class="text-center">Heart Disesase Prediction Result</h1>
7-
{% if prediction==1 %}
8-
<h1>Prediction: <span class='danger'>Oops! You have Heart Disesase.</span></h1>
9-
<img class="gif" src="{{ url_for('static', filename='sad.gif') }}" alt="Image">
10-
{% elif prediction==0 %}
11-
<h1>Prediction: <span class='safe'>Great! You DON'T have Heart Disesase.</span></h1>
12-
<img class="gif1" src="{{ url_for('static', filename='no-diabetes.gif') }}" alt="Image">
13-
{% endif %}
14-
</div>
7+
</div>
8+
<!-- Result -->
9+
<div class="text-center">
10+
{% if prediction==1 %}
11+
<h1>Prediction: <span class='danger'>Oops! You have Heart Disesase.</span></h1>
12+
<img class="gif" src="{{ url_for('static', filename='sad.gif') }}" alt="Image">
13+
{% elif prediction==0 %}
14+
<h1>Prediction: <span class='safe'>Great! You DON'T have Heart Disesase.</span></h1>
15+
<img class="gif1" src="{{ url_for('static', filename='no-diabetes.gif') }}" alt="Image">
16+
{% endif %}
17+
</div>
1518

1619
{% endblock %}

templates/heart.html

+71-17
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,76 @@
22

33
{% block body %}
44
<br>
5-
<div class="container px-2 col-lg-5 col-sm-12">
6-
<h1 class="text-center">Heart Disease Prediction</h1>
7-
<form action="{{ url_for('predict_heart') }}" method="POST">
8-
<input class="form-input" type="text" name="age" placeholder="Age (years) eg. 34" required><br>
9-
<input class="form-input" type="text" name="sex" placeholder="Sex (eg. 0: Female, 1:Male)" required><br>
10-
<input class="form-input" type="text" name="chestpaintype" placeholder="Chest Pain Type" required><br>
11-
<input class="form-input" type="text" name="trestbps" placeholder="Trestbps" required><br>
12-
<input class="form-input" type="text" name="serumcholestoral" placeholder="Serum cholestoral in mg/dl" required><br>
13-
<input class="form-input" type="text" name="restecg" placeholder="Restecg" required><br>
14-
<input class="form-input" type="text" name="thalach" placeholder="Thalach" required><br>
15-
<input class="form-input" type="text" name="exang" placeholder="Exang" required><br>
16-
<input class="form-input" type="text" name="oldpeak" placeholder="Oldpeak" required><br>
17-
<input class="form-input" type="text" name="slope" placeholder="Slope" required><br>
18-
<input class="form-input" type="text" name="thal" placeholder="Thal" required><br>
19-
<input type="submit" class="my-cta-button" value="Predict">
20-
</form>
21-
</div>
5+
<div class="container">
6+
<h1 class="text-center mb-2 pb-2"><u>Heart Disease Prediction</u></h1>
7+
</div>
8+
<div class="container-castome mx-auto">
9+
<form action="{{ url_for('predict_heart') }}" method="POST">
10+
<div class="form-group">
11+
<label class="lb-lg">Age</label>
12+
<input type="text" class="form-control" name="age" placeholder="Age (years) eg. 34">
13+
</div>
14+
15+
<div class="form-group">
16+
<label class="lb-lg">Sex</label>
17+
<select class="form-control" name="sex">
18+
<option value="0">Female</option>
19+
<option value="1">Male</option>
20+
</select>
21+
</div>
22+
23+
<div class="form-group">
24+
<label class="lb-lg">Chest Pain</label>
25+
<select class="form-control" name="chestpaintype">
26+
<option value="1">Yes</option>
27+
<option value="0">No</option>
28+
</select>
29+
</div>
30+
31+
<div class="form-group">
32+
<label class="lb-lg">Trestbps</label>
33+
<input type="text" class="form-control" name="trestbps" placeholder="Trestbps">
34+
</div>
35+
36+
<div class="form-group">
37+
<label class="lb-lg">Serum Cholestoral</label>
38+
<input type="text" class="form-control" name="serumcholestoral" placeholder="Serum cholestoral in mg/dl">
39+
</div>
40+
41+
<div class="form-group">
42+
<label class="lb-lg">Restecg</label>
43+
<input type="text" class="form-control" name="restecg" placeholder="Restecg">
44+
</div>
45+
46+
<div class="form-group">
47+
<label class="lb-lg">Thalach</label>
48+
<input type="text" class="form-control" name="thalach" placeholder="Thalach">
49+
</div>
50+
51+
<div class="form-group">
52+
<label class="lb-lg">Exang</label>
53+
<input type="text" class="form-control" name="exang" placeholder="Exang">
54+
</div>
55+
56+
<div class="form-group">
57+
<label class="lb-lg">Oldpeak</label>
58+
<input type="text" class="form-control" name="oldpeak" placeholder="Oldpeak">
59+
</div>
60+
61+
<div class="form-group">
62+
<label class="lb-lg">Slope</label>
63+
<input type="text" class="form-control" name="slope" placeholder="Slope">
64+
</div>
65+
66+
<div class="form-group">
67+
<label class="lb-lg">Thal</label>
68+
<input type="text" class="form-control" name="thal" placeholder="Thal">
69+
</div>
70+
71+
<div class="text-center mb-5 pb-4">
72+
<input type="submit" class="my-cta-button" value="Predict">
73+
</div>
74+
</form>
75+
</div>
2276

2377
{% endblock %}

0 commit comments

Comments
 (0)