hysts HF Staff commited on
Commit
74ad559
·
1 Parent(s): 8224854
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -865,6 +865,8 @@ def _on_video_change_pointbox(state: AppState, video: str | dict) -> tuple[AppSt
865
 
866
 
867
  def _on_video_change_text(state: AppState, video: str | dict) -> tuple[AppState, dict, Image.Image, str, str]:
 
 
868
  state, min_idx, max_idx, first_frame, status = init_video_session(state, video, "text")
869
  active_prompts = _get_active_prompts_display(state)
870
  return (
 
865
 
866
 
867
  def _on_video_change_text(state: AppState, video: str | dict) -> tuple[AppState, dict, Image.Image, str, str]:
868
+ if video is None:
869
+ return state, None, None, None, None
870
  state, min_idx, max_idx, first_frame, status = init_video_session(state, video, "text")
871
  active_prompts = _get_active_prompts_display(state)
872
  return (