Spaces:
Running
on
T4
Running
on
T4
safety check added to get_first_frame
Browse files
app.py
CHANGED
@@ -201,6 +201,8 @@ def inpaint_video(original_frame_list, mask_list, in_fps, dt_string):
|
|
201 |
|
202 |
|
203 |
def get_first_frame(video):
|
|
|
|
|
204 |
video_capture = cv2.VideoCapture()
|
205 |
if video_capture.open(video):
|
206 |
width, height = int(video_capture.get(cv2.CAP_PROP_FRAME_WIDTH)), int(
|
|
|
201 |
|
202 |
|
203 |
def get_first_frame(video):
|
204 |
+
if(video == None):
|
205 |
+
return gr.ImageMask()
|
206 |
video_capture = cv2.VideoCapture()
|
207 |
if video_capture.open(video):
|
208 |
width, height = int(video_capture.get(cv2.CAP_PROP_FRAME_WIDTH)), int(
|