Spaces:
Paused
Paused
Update web-demos/hugging_face/app.py
Browse files
web-demos/hugging_face/app.py
CHANGED
@@ -108,11 +108,11 @@ def get_frames_from_video(video_input, video_state):
|
|
108 |
except (OSError, TypeError, ValueError, KeyError, SyntaxError) as e:
|
109 |
status_ok = False
|
110 |
print("read_frame_source:{} error. {}\n".format(video_path, str(e)))
|
111 |
-
|
112 |
# initialize video_state
|
113 |
if frames[0].shape[0] > 720 or frames[0].shape[1] > 720:
|
114 |
-
|
115 |
-
|
116 |
video_state = {
|
117 |
"user_name": user_name,
|
118 |
"video_name": os.path.split(video_path)[-1],
|
|
|
108 |
except (OSError, TypeError, ValueError, KeyError, SyntaxError) as e:
|
109 |
status_ok = False
|
110 |
print("read_frame_source:{} error. {}\n".format(video_path, str(e)))
|
111 |
+
|
112 |
# initialize video_state
|
113 |
if frames[0].shape[0] > 720 or frames[0].shape[1] > 720:
|
114 |
+
operation_log = [(f"Video uploaded! Try to click the image shown in step2 to add masks. (You uploaded a video with a size of {original_w}x{original_h}, and the length of its longest edge exceeds 720 pixels. We may resize the input video during processing.)", "Normal")]
|
115 |
+
|
116 |
video_state = {
|
117 |
"user_name": user_name,
|
118 |
"video_name": os.path.split(video_path)[-1],
|