|
| 1 | +<!DOCTYPE html> |
| 2 | +<html> |
| 3 | + |
| 4 | +<head> |
| 5 | + <meta charset="UTF-8"> |
| 6 | + <!-- Bootstrap CSS --> |
| 7 | + <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> |
| 8 | + <title>Stroke Prediction</title> |
| 9 | + <style> |
| 10 | + /*just bg and body style*/ |
| 11 | + body { |
| 12 | + margin: 40px; |
| 13 | + background-color: #808080; |
| 14 | + background-image: linear-gradient(315deg, #B993D6 19%, #8CA6DB 85%); |
| 15 | + } |
| 16 | + |
| 17 | + .container { |
| 18 | + border-radius: 5px; |
| 19 | + text-align: center; |
| 20 | + } |
| 21 | + |
| 22 | + .btn-container { |
| 23 | + background: #cdb4db; |
| 24 | + box-shadow: 0 19px 38px rgba(0, 0, 0, 0.30), 0 15px 12px rgba(0, 0, 0, 0.22); |
| 25 | + border-radius: 5px; |
| 26 | + padding: 10px; |
| 27 | + } |
| 28 | + |
| 29 | + .head { |
| 30 | + font-weight: bolder; |
| 31 | + } |
| 32 | + |
| 33 | + .btn-primary { |
| 34 | + color: #ffffff; |
| 35 | + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); |
| 36 | + background-color: #073b4c !important; |
| 37 | + border-color: #023047 !important; |
| 38 | + padding: 10px; |
| 39 | + margin-top: 15px; |
| 40 | + } |
| 41 | + |
| 42 | + label { |
| 43 | + width: 50%; |
| 44 | + } |
| 45 | + |
| 46 | + #predict { |
| 47 | + display: none; |
| 48 | + } |
| 49 | + |
| 50 | + .form-group { |
| 51 | + padding: 2px; |
| 52 | + } |
| 53 | + |
| 54 | + .form-select { |
| 55 | + padding: 5px; |
| 56 | + border-radius: 5px; |
| 57 | + border: 0px; |
| 58 | + width: 200px; |
| 59 | + } |
| 60 | + |
| 61 | + .prediction { |
| 62 | + background: #073b4c; |
| 63 | + color: aliceblue; |
| 64 | + } |
| 65 | + |
| 66 | + </style> |
| 67 | + <!--Font Awesome--> |
| 68 | + <script src="https://kit.fontawesome.com/a076d05399.js"></script> |
| 69 | + <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous"> |
| 70 | + <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> |
| 71 | + <!-- jQuery first, then Popper.js, then Bootstrap JS --> |
| 72 | + <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js" integrity="sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg==" crossorigin="anonymous"></script> |
| 73 | + <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script> |
| 74 | + <script src=" https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity=" sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin=" anonymous" ></script> |
| 75 | + <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script> |
| 76 | +</head> |
| 77 | + |
| 78 | +<body> |
| 79 | + <div class="container"> |
| 80 | + <div class="row"> |
| 81 | + <div class="col-md-12"> |
| 82 | + <h1 class="head">Stroke Prediction</h1> |
| 83 | + </div> |
| 84 | + </div> |
| 85 | + <div class="row"> |
| 86 | + <div class="col-md-12"> |
| 87 | + <div class="btn-container"> |
| 88 | + |
| 89 | + <!-- Main Input For Receiving Query to our ML --> |
| 90 | + <form action="{{ url_for('predict')}}" method="post" class="form-inline"> |
| 91 | + <div class="row"> |
| 92 | + <div class="col-md-6"> |
| 93 | + <img class="image" src="{{ url_for('static', filename='image3.jpg')}}" width="100%" height="100%" /> |
| 94 | + </div> |
| 95 | + <div class="col-md-6"> |
| 96 | + <div class="container"> |
| 97 | + <h4>Enter Details</h4> |
| 98 | + <div class="form-group"> |
| 99 | + <label for="gender">Gender </label> |
| 100 | + <select class="form-select" id="gender" name="gender" aria-label="Default select example" > |
| 101 | + <option value="1">Male</option> |
| 102 | + <option value="0">Female</option> |
| 103 | + </select> |
| 104 | + </div> |
| 105 | + <div class="form-group"> |
| 106 | + <label for="age">Age</label> |
| 107 | + <input type="number" class="form-control" name="age" required="required" placeholder="Age" min=1 max=100/> |
| 108 | + </div> |
| 109 | + <div class="form-group"> |
| 110 | + <label for="hypertension">Hypertension</label> |
| 111 | + <select class="form-select" id="hypertension" name="hypertension" aria-label="Default select example"> |
| 112 | + |
| 113 | + <option value="1" selected>Yes</option> |
| 114 | + <option value="0">No</option> |
| 115 | + </select> |
| 116 | + </div> |
| 117 | + <div class="form-group"> |
| 118 | + <label for="heart_disease">Heart Disease</label> |
| 119 | + <select class="form-select" id="disease" name="disease" aria-label="Default select example"> |
| 120 | + |
| 121 | + <option value="1" selected>Yes</option> |
| 122 | + <option value="0">No</option> |
| 123 | + </select> |
| 124 | + </div> |
| 125 | + <div class="form-group"> |
| 126 | + <label for="ever_married">Ever Married</label> |
| 127 | + <select class="form-select" id="married" name="married" aria-label="Default select example"> |
| 128 | + |
| 129 | + <option value="1" selected>Yes</option> |
| 130 | + <option value="0">No</option> |
| 131 | + </select> |
| 132 | + </div> |
| 133 | + <div class="form-group"> |
| 134 | + <label for="work_type">Work Type</label> |
| 135 | + <select class="form-select" id="work" name="work" aria-label="Default select example"> |
| 136 | + |
| 137 | + <option value="3" selected>Self-employed</option> |
| 138 | + <option value="2">Private</option> |
| 139 | + <option value="4">children</option> |
| 140 | + <option value="0">Government Job</option> |
| 141 | + <option value="1">Never_worked</option> |
| 142 | + </select> |
| 143 | + </div> |
| 144 | + <div class="form-group"> |
| 145 | + <label for="residence_type">Residence Type</label> |
| 146 | + <select class="form-select" id="residence" name="residence" aria-label="Default select example"> |
| 147 | + |
| 148 | + <option value="1" selected>Urban</option> |
| 149 | + <option value="0">Rural</option> |
| 150 | + </select> |
| 151 | + </div> |
| 152 | + |
| 153 | + <div class="form-group"> |
| 154 | + <label for="avg_glucose_level">Average Glucose Level</label> |
| 155 | + <input type="text" class="form-control" name="avg_glucose_level" required="required" placeholder="Average Glucose Level" /> |
| 156 | + </div> |
| 157 | + <div class="form-group"> |
| 158 | + <label for="bmi">BMI</label> |
| 159 | + <input type="text" class="form-control" name="bmi" required="required" placeholder="Body Mass Index (BMI)"> |
| 160 | + </div> |
| 161 | + <div class="form-group"> |
| 162 | + <label for="smoking">Smoking Status</label> |
| 163 | + <select class="form-select" id="smoking" name="smoking" aria-label="Default select example"> |
| 164 | + <option value="0">Unknown</option> |
| 165 | + <option value="2" selected>Never smoked</option> |
| 166 | + <option value="1">Formerly smoked</option> |
| 167 | + <option value="3">Smokes</option> |
| 168 | + </select> |
| 169 | + </div> |
| 170 | + <button type="submit" class="btn btn-primary btn-lg">Predict</button> |
| 171 | + </div> |
| 172 | + </div> |
| 173 | + </div> |
| 174 | + </form> |
| 175 | + <br /> |
| 176 | + <center> |
| 177 | + <h1 class="prediction">{{prediction_text}}</h1> |
| 178 | + </center> |
| 179 | + <br /> |
| 180 | +</body> |
| 181 | + |
| 182 | +</html> |
0 commit comments