Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ elif diffuculty == 'Professionals':
|
|
27 |
#elif difficulty == 'Push up':
|
28 |
#thresholds = get_pushups()
|
29 |
|
30 |
-
|
31 |
|
32 |
# Initialize face mesh solution
|
33 |
pose = get_mediapipe_pose()
|
@@ -89,7 +89,7 @@ if up_file and uploaded_File:
|
|
89 |
|
90 |
# convert frame from BGR to RGB before processing it.
|
91 |
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
|
92 |
-
out_frame, _ =
|
93 |
stframe.image(out_frame)
|
94 |
video_output.write(out_frame[...,::-1])
|
95 |
|
|
|
27 |
#elif difficulty == 'Push up':
|
28 |
#thresholds = get_pushups()
|
29 |
|
30 |
+
upload_process_frame = ProcessFrame(thresholds=thresholds)
|
31 |
|
32 |
# Initialize face mesh solution
|
33 |
pose = get_mediapipe_pose()
|
|
|
89 |
|
90 |
# convert frame from BGR to RGB before processing it.
|
91 |
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
|
92 |
+
out_frame, _ = upload_process_frame.process(frame, pose)
|
93 |
stframe.image(out_frame)
|
94 |
video_output.write(out_frame[...,::-1])
|
95 |
|