-
Notifications
You must be signed in to change notification settings - Fork 0
/
routes.py
369 lines (302 loc) · 11 KB
/
routes.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
from flask import Flask, render_template, Response, request
import cv2
from Models.improvedCode import utils as u
import numpy as np
from Models.shoulders.overheadpress import *
from Models.shoulders.dips import *
from Models.shoulders.pikepress import *
from Models.shoulders.renegadeRow import *
from Models.shoulders.snatchGripLowPull import *
from Models.legs.squats import *
from Models.legs.SinglelegGlute import *
from Models.legs.Reverselunges import *
from Models.legs.RomanionSquats import *
from Models.legs.LateralLegRaisesRightSIDE import LateralLegRaisesRightSIDE
from Models.chest.BarbellBenchPress import *
from Models.chest.dips import *
from Models.chest.DumbbellBenchPress import *
from Models.chest.pushups import *
from Models.chest.Widepushups import *
from Models.chest.Diamondpushups import *
from Models.chest.ChestFly import *
from Models.back.BentoverRow import *
from Models.back.Deadlift import *
from Models.back.DumbbellSingleArmRow import *
from Models.back.LatPullDown import *
from Models.back.Pullups import *
from Models.others.Newcurl import *
from Models.others.Plank import *
from Models.improvedCode.camera import Camera
app = Flask(__name__)
# from seconderoute import second
# app.register_blueprint(second, url_prefix='/test')
@app.route('/')
@app.route('/index')
def home_page():
return render_template('index.html')
@app.route('/Exercises')
def exercices_page():
return render_template('Exercises.html')
@app.route('/page-user')
def user_page():
return render_template('page-user.html')
# /////////////////////////////////////
# ///////////////////// shoulder Cycle Routes//////////////////////////////
@app.route('/shoulder')
def shoulder_page():
return render_template('shoulder_cycle.html')
@app.route('/pikePressCycle')
def pikePressCycle():
return render_template('pikePressCycle.html')
@app.route('/DipsShoulderCycle')
def DipsShoulderCycle():
return render_template('DipsShoulderCycle.html')
@app.route('/renegadeRowCycle')
def renegadeRowCycle():
return render_template('renegadeRowCycle.html')
@app.route('/snatchgripCycle')
def snatchgripCycle():
return render_template('snatchgripCycle.html')
# ///////////////////// legs Cycle Routes//////////////////////////////
@app.route('/legs')
def legs_page():
return render_template('legs_cycle.html')
@app.route('/LateralLegCycle')
def LateralLegCycle():
return render_template('laterallegCycle.html')
@app.route('/reverselungesCycle')
def reverselungesCycle():
return render_template('reverselungesCycle.html')
@app.route('/romanionsquatCycle')
def romanionsquatCycle():
return render_template('romanionsquatCycle.html')
@app.route('/singleleggluteCycle')
def singleleggluteCycle():
return render_template('singleleggluteCycle.html')
# ///////////////////// Chest Cycle Routes//////////////////////////////
@app.route('/chest')
def chest_page():
return render_template('chest_cycle.html')
@app.route('/BarbellBenchPressCycle')
def BarbellBenchPressCycle():
return render_template('BarbellBenchPressCycle.html')
@app.route('/ChestflyCycle')
def ChestflyCycle():
return render_template('ChestflyCycle.html')
@app.route('/DipsChestCycle')
def DipsChestCycle():
return render_template('DipsChestCycle.html')
@app.route('/pushupCycle')
def pushupCycle():
return render_template('pushupCycle.html')
@app.route('/widePushupCycle')
def widePushupCycle():
return render_template('widePushupCycle.html')
@app.route('/DiamondPushupCycle')
def DiamondPushupCycle():
return render_template('DiamondPushupCycle.html')
# ///////////////////// Back Cycle Routes//////////////////////////////
@app.route('/back')
def back_page():
return render_template('back_cycle.html')
@app.route('/BentOverrowCycle')
def BentOverrowCycle():
return render_template('BentOverrowCycle.html')
@app.route('/LatPulldowncycle')
def LatPulldowncycle():
return render_template('LatPulldowncycle.html')
@app.route('/pullupsCycle')
def pullupsCycle():
return render_template('pullupsCycle.html')
@app.route('/DumbbellsinglearmCycle')
def DumbbellsinglearmCycle():
return render_template('DumbbellsinglearmCycle.html')
# ///////////////////////////////////
# legs routes
@app.route('/exercise01')
def ex01_page():
return render_template('exercise01.html')
@app.route('/exercise02')
def ex02_page():
return render_template('exercise02.html')
@app.route('/exercise03')
def ex03_page():
return render_template('exercise03.html')
@app.route('/exercise04')
def ex04_page():
return render_template('exercise04.html')
@app.route('/exercise05')
def ex05_page():
return render_template('exercise05.html')
@app.route('/squats')
def squats():
return Response(Squats(Camera()),
mimetype='multipart/x-mixed-replace; boundary=frame')
@app.route('/laterallegraiseleft')
def laterallegraiseleft():
return Response(LateralLegRaisesRightSIDE(Camera()),
mimetype='multipart/x-mixed-replace; boundary=frame')
@app.route('/singlelegglute')
def singlelegglute():
return Response(SingleLegGlute(Camera()),
mimetype='multipart/x-mixed-replace; boundary=frame')
@app.route('/Romanionsquats')
def Romanionsquats():
return Response(RomanionSquats(Camera()),
mimetype='multipart/x-mixed-replace; boundary=frame')
@app.route('/reverselunges')
def reverselunges():
return Response(ReverseLungs(Camera()),
mimetype='multipart/x-mixed-replace; boundary=frame')
# chest routes
@app.route('/exercise11')
def ex11_page():
return render_template('exercise11.html')
@app.route('/exercise12')
def ex12_page():
return render_template('exercise12.html')
@app.route('/exercise13')
def ex13_page():
return render_template('exercise13.html')
@app.route('/exercise14')
def ex14_page():
return render_template('exercise14.html')
@app.route('/exercise15')
def ex15_page():
return render_template('exercise15.html')
@app.route('/exercise16')
def ex16_page():
return render_template('exercise16.html')
@app.route('/exercise17')
def ex17_page():
return render_template('exercise17.html')
@app.route('/Dumbbellbenchpress')
def Dumbbellbenchpress():
return Response(DumbbellBenchPress(Camera()),
mimetype='multipart/x-mixed-replace; boundary=frame')
@app.route('/Barbellbenchpress')
def Barbellbenchpress():
return Response(BarbellBenchPress(Camera()),
mimetype='multipart/x-mixed-replace; boundary=frame')
@app.route('/Chestfly')
def Chestfly():
return Response(ChestFly(Camera()),
mimetype='multipart/x-mixed-replace; boundary=frame')
@app.route('/dips')
def dips():
return Response(Dips(Camera()),
mimetype='multipart/x-mixed-replace; boundary=frame')
@app.route('/PushUps')
def PushUps():
return Response(Pushups(Camera()),
mimetype='multipart/x-mixed-replace; boundary=frame')
@app.route('/WidePushUps')
def WidePushUps():
return Response(WidePushups(Camera()),
mimetype='multipart/x-mixed-replace; boundary=frame')
@app.route('/DiamondPushUps')
def DiamondPushUps():
return Response(DiamondPushups(Camera()),
mimetype='multipart/x-mixed-replace; boundary=frame')
# shoulder routes
@app.route('/exercise21')
def ex21_page():
return render_template('exercise21.html')
@app.route('/exercise22')
def ex22_page():
return render_template('exercise22.html')
@app.route('/exercise24')
def ex24_page():
return render_template('exercise24.html')
@app.route('/exercise25')
def ex25_page():
return render_template('exercise25.html')
@app.route('/overheadpress')
def overheadpress():
return Response(Overheadpress(Camera()),
mimetype='multipart/x-mixed-replace; boundary=frame')
@app.route('/Pikepress')
def Pikepress():
return Response(PikePress(Camera()),
mimetype='multipart/x-mixed-replace; boundary=frame')
@app.route('/Renegaderow')
def Renegaderow():
return Response(RenegadeRow(Camera()),
mimetype='multipart/x-mixed-replace; boundary=frame')
@app.route('/Snatchgriplowpull')
def Snatchgriplowpull():
return Response(SnatchGripLowPull(Camera()),
mimetype='multipart/x-mixed-replace; boundary=frame')
# Back routes
@app.route('/exercise31')
def ex31_page():
return render_template('exercise31.html')
@app.route('/exercise32')
def ex32_page():
return render_template('exercise32.html')
@app.route('/exercise33')
def ex33_page():
return render_template('exercise33.html')
@app.route('/exercise34')
def ex34_page():
return render_template('exercise34.html')
@app.route('/exercise35')
def ex35_page():
return render_template('exercise35.html')
@app.route('/pullups')
def pullups():
return Response(Pullups(Camera()),
mimetype='multipart/x-mixed-replace; boundary=frame')
@app.route('/LatpullDown')
def LatpullDown():
return Response(LatPullDown(Camera()),
mimetype='multipart/x-mixed-replace; boundary=frame')
@app.route('/deadlift')
def deadlift():
return Response(Deadlift(Camera()),
mimetype='multipart/x-mixed-replace; boundary=frame')
@app.route('/BentOverrow')
def BentOverrow():
return Response(BentOverRow(Camera()),
mimetype='multipart/x-mixed-replace; boundary=frame')
@app.route('/DumbbellSinglearmrow')
def DumbbellSinglearmrow():
return Response(DumbbellSingleArmRow(Camera()),
mimetype='multipart/x-mixed-replace; boundary=frame')
# ////////////////////////////////////////////////////////
@app.route('/exercise40')
def ex40_page():
return render_template('exercise40.html')
@app.route('/exercise41')
def ex41_page():
return render_template('exercise41.html')
@app.route('/plank')
def plank():
return Response(Plank(Camera()),
mimetype='multipart/x-mixed-replace; boundary=frame')
@app.route('/curl')
def curl():
return Response(Curl(Camera()),
mimetype='multipart/x-mixed-replace; boundary=frame')
# @app.route('/video_feed')
# def video_feed():
# return Response(Overheadpress(Camera()),
# mimetype='multipart/x-mixed-replace; boundary=frame')
#
# @app.route('/video_feed/{string:username}', methods=['GET', 'POST'])
# def video_feed(username):
# if username == "overheadpress":
# return Response(Overheadpress(Camera()),
# mimetype='multipart/x-mixed-replace; boundary=frame')
# else:
# return Response(Squats(Camera()),
# mimetype='multipart/x-mixed-replace; boundary=frame')
# @app.route('/<variable>/overheadpress', methods=['GET', 'POST'])
# def overheadpress(variable):
# return Response(Overheadpress(Camera()),
# mimetype='multipart/x-mixed-replace; boundary=frame')
#
# @app.route('/<variable>/squats', methods=['GET', 'POST'])
# def squats(variable):
# return Response(Squats(Camera()),
# mimetype='multipart/x-mixed-replace; boundary=frame')