chiyoi commited on
Commit
a913f27
1 Parent(s): 6438f39
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -22,6 +22,9 @@ print('Load detector.')
22
  detector = load_detector(config)
23
 
24
  def fn(video: gr.Video, actions: list[int]):
 
 
 
25
  print('Process video.')
26
  do_detect = 0 in actions
27
  do_classify = 1 in actions
 
22
  detector = load_detector(config)
23
 
24
  def fn(video: gr.Video, actions: list[int]):
25
+ yield None, None
26
+ if video is None:
27
+ return
28
  print('Process video.')
29
  do_detect = 0 in actions
30
  do_classify = 1 in actions