file display
Browse files
main.py
CHANGED
@@ -43,8 +43,14 @@ def poses(photo, check):
|
|
43 |
rebase_keypoint_height=True)
|
44 |
|
45 |
result = next(result_generator)
|
46 |
-
|
47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
# # Prepare to save video
|
49 |
# output_file = os.path.join("output.mp4")
|
50 |
|
@@ -98,7 +104,7 @@ def run():
|
|
98 |
webcam = gr.Interface(
|
99 |
fn=poses,
|
100 |
inputs= [gr.Video(source="webcam"), check_web],
|
101 |
-
outputs = gr.
|
102 |
title = 'Pose estimation',
|
103 |
description = 'Pose estimation on video',
|
104 |
allow_flagging=False
|
@@ -107,7 +113,7 @@ def run():
|
|
107 |
file = gr.Interface(
|
108 |
poses,
|
109 |
inputs = [gr.Video(source="upload"), check_file],
|
110 |
-
outputs = gr.
|
111 |
allow_flagging=False
|
112 |
)
|
113 |
|
|
|
43 |
rebase_keypoint_height=True)
|
44 |
|
45 |
result = next(result_generator)
|
46 |
+
print(type(result))
|
47 |
+
|
48 |
+
print(["[INFO] Result from iterator: ", result])
|
49 |
+
|
50 |
+
for r in result_generator:
|
51 |
+
print("[INFO] Single result: ", r)
|
52 |
+
|
53 |
+
print(type(r))
|
54 |
# # Prepare to save video
|
55 |
# output_file = os.path.join("output.mp4")
|
56 |
|
|
|
104 |
webcam = gr.Interface(
|
105 |
fn=poses,
|
106 |
inputs= [gr.Video(source="webcam"), check_web],
|
107 |
+
outputs = gr.PlayableVideo(), #file_types=['.mp4'] #gr.Video(),
|
108 |
title = 'Pose estimation',
|
109 |
description = 'Pose estimation on video',
|
110 |
allow_flagging=False
|
|
|
113 |
file = gr.Interface(
|
114 |
poses,
|
115 |
inputs = [gr.Video(source="upload"), check_file],
|
116 |
+
outputs = gr.PlayableVideo(),
|
117 |
allow_flagging=False
|
118 |
)
|
119 |
|