-
Notifications
You must be signed in to change notification settings - Fork 0
/
base.py
50 lines (24 loc) · 813 Bytes
/
base.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
from flask import Flask,render_template,request
import tensorflow as tf
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
@app.route('/signup')
def signup():
return render_template('signup.html')
@app.route('/thankyou')
def thankyou():
import joblib
model=joblib.load('mrg_pred.pkl')
gender=request.args.get('gender')
religion=request.args.get('religion')
caste=request.args.get('caste')
height_cms=request.args.get('height_cms')
prediction=model.predict([[gender,religion,caste,height_cms]])
return render_template('thankyou.html',prediction=prediction)
@app.errorhandler(404)
def page_not_found(e):
return render_template('404.html'),404
if __name__ == '__main__':
app.run(debug=True)