Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,7 +25,7 @@ def detect_pose(video_file):
|
|
| 25 |
|
| 26 |
fps = cap.get(cv2.CAP_PROP_FPS) or 30
|
| 27 |
total_frames = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))
|
| 28 |
-
max_frames = int(min(total_frames / fps,
|
| 29 |
|
| 30 |
output_frames = []
|
| 31 |
|
|
@@ -78,7 +78,7 @@ iface = gr.Interface(
|
|
| 78 |
inputs=gr.Video(label="Upload a Video (max 10s)"),
|
| 79 |
outputs=[gr.Video(label="Pose Detection Output"), gr.Textbox(label="Status")],
|
| 80 |
title="Multi-Person Pose Detection",
|
| 81 |
-
description="Upload a short video (max
|
| 82 |
)
|
| 83 |
|
| 84 |
iface.launch()
|
|
|
|
| 25 |
|
| 26 |
fps = cap.get(cv2.CAP_PROP_FPS) or 30
|
| 27 |
total_frames = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))
|
| 28 |
+
max_frames = int(min(total_frames / fps, 15) * fps) # limit to 15s
|
| 29 |
|
| 30 |
output_frames = []
|
| 31 |
|
|
|
|
| 78 |
inputs=gr.Video(label="Upload a Video (max 10s)"),
|
| 79 |
outputs=[gr.Video(label="Pose Detection Output"), gr.Textbox(label="Status")],
|
| 80 |
title="Multi-Person Pose Detection",
|
| 81 |
+
description="Upload a short video (max 15s). The app detects multiple people and estimates their poses."
|
| 82 |
)
|
| 83 |
|
| 84 |
iface.launch()
|