-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.py
60 lines (46 loc) · 1.72 KB
/
app.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
51
52
53
54
55
56
57
58
59
60
from flask import Flask, render_template, url_for, send_file, request, redirect
import extract
# import classify_script
app = Flask(__name__)
@app.route('/', methods=['GET', 'POST'])
def index():
# extract.run()
return render_template('page1.html')
@app.route('/extract', methods=['GET', 'POST'])
def extract():
if request.method == 'POST':
# sharpFrame = extract.spit()
return redirect(url_for('index'))
return render_template('page2.html', frame = sharpFrame)
if __name__ == "__main__":
app.run(debug=True)
'''
def loadVideo():
# get video path via JQuery
'''
# @app.route('/classify', methods=['GET', 'POST'])
# def classify():
# if request.method == 'POST':
# # do stuff when the form is submitted
# # redirect to end the POST handling
# # the redirect can be to the same route or somewhere else
# return redirect(url_for('extract'))
# # show the form, it wasn't submitted
# return render_template('page3.html')
# @app.route('/result', methods=['GET', 'POST'])
# def result():
# if request.method == 'POST':
# # do stuff when the form is submitted
# # redirect to end the POST handling
# # the redirect can be to the same route or somewhere else
# return redirect(url_for('classify'))
# # show the form, it wasn't submitted
# return render_template('page4.html')
# def index(user):
# if request.method == "POST":
# user = request.form['username']
# return redirect(url_for('home'), username = user)
# return render_template('lang.html', name = user)
# @app.route('/home')
# def home(name):
# return 'Welcome %s' % name