ShadowTEM commited on
Commit
8c35d16
·
verified ·
1 Parent(s): 2baea0e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -21
app.py CHANGED
@@ -1,22 +1,22 @@
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)
 
1
+ from flask import Flask, render_template, request
2
+ from deployment.controller.GetPredictions import GetPredictions
3
+ from deployment.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)