Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -31,9 +31,10 @@ def get_frame_count(filepath):
|
|
| 31 |
if frame_count > 24 :
|
| 32 |
frame_count = 24 # limit to 24 frames to avoid cuDNN errors
|
| 33 |
|
|
|
|
|
|
|
| 34 |
else:
|
| 35 |
-
|
| 36 |
-
return gr.update(maximum=frame_count)
|
| 37 |
|
| 38 |
def get_video_dimension(filepath):
|
| 39 |
video = cv2.VideoCapture(filepath)
|
|
|
|
| 31 |
if frame_count > 24 :
|
| 32 |
frame_count = 24 # limit to 24 frames to avoid cuDNN errors
|
| 33 |
|
| 34 |
+
return gr.update(maximum=frame_count)
|
| 35 |
+
|
| 36 |
else:
|
| 37 |
+
return gr.update(value=1, maximum=12 )
|
|
|
|
| 38 |
|
| 39 |
def get_video_dimension(filepath):
|
| 40 |
video = cv2.VideoCapture(filepath)
|