-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
35 lines (26 loc) · 835 Bytes
/
app.py
File metadata and controls
35 lines (26 loc) · 835 Bytes
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
from flask import Flask
from flask import request, jsonify, redirect, url_for
from werkzeug.utils import secure_filename
#from keras.models import load_model
import pickle
from flask import render_template
app = Flask(__name__)
# Post Request
# process audiofile
# return 1 for unhealthy and Return
#model = load_model('model.h5')
#filename = "heartbeat_disease_model_pkl.sav"
#loaded_model = pickle.load(open(filename, 'rb'))
#def pAudio():
@app.route('/server', methods = ['POST'])
def hello_world_sever():
if request.method == 'POST':
if 'file' not in request.files:
#flash('No file part')
#f = request.files['file']
return 'You have a healthy Heart'
@app.route('/')
def hello_world():
return render_template("kobe.html")
if __name__ == '__main__':
app.run(debug=True)