sczhou commited on
Commit
8e14395
β€’
1 Parent(s): c09c992
Files changed (1) hide show
  1. web-demos/hugging_face/app.py +4 -1
web-demos/hugging_face/app.py CHANGED
@@ -101,7 +101,10 @@ def get_frames_from_video(video_input, video_state):
101
  else:
102
  break
103
  t = len(frames)
104
- print(f'Inp video shape: t_{t}, s_{original_h}x{original_w} to s_{target_h}x{target_w}')
 
 
 
105
  except (OSError, TypeError, ValueError, KeyError, SyntaxError) as e:
106
  status_ok = False
107
  print("read_frame_source:{} error. {}\n".format(video_path, str(e)))
 
101
  else:
102
  break
103
  t = len(frames)
104
+ if t > 0:
105
+ print(f'Inp video shape: t_{t}, s_{original_h}x{original_w} to s_{target_h}x{target_w}')
106
+ else:
107
+ print(f'Inp video shape: t_{t}, no input video!!!')
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)))