Spaces:
Sleeping
Sleeping
Delete app.py
Browse files
app.py
DELETED
|
@@ -1,22 +0,0 @@
|
|
| 1 |
-
from flask import Flask, render_template, request
|
| 2 |
-
from controller.GetPredictions import GetPredictions
|
| 3 |
-
from controller.LoadModel import LoadModel
|
| 4 |
-
|
| 5 |
-
app = Flask(__name__)
|
| 6 |
-
|
| 7 |
-
model = LoadModel('deployment/models/heart_attack_detection_model_99.3%.pkl')
|
| 8 |
-
|
| 9 |
-
@app.route('/')
|
| 10 |
-
def home():
|
| 11 |
-
return render_template('home.html')
|
| 12 |
-
|
| 13 |
-
@app.route('/predict', methods=['POST'])
|
| 14 |
-
def predict():
|
| 15 |
-
if request.method == 'POST':
|
| 16 |
-
inputs = request.form.to_dict()
|
| 17 |
-
prediction = GetPredictions(model, inputs)
|
| 18 |
-
|
| 19 |
-
return render_template('result.html', prediction=prediction)
|
| 20 |
-
|
| 21 |
-
if __name__ == '__main__':
|
| 22 |
-
app.run(debug=True, host="0.0.0.0", port=8000)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|