hysts HF staff commited on
Commit
25f96d7
1 Parent(s): f740706
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -485,6 +485,8 @@ def add_tracking_points(
485
  tracking_points, first_frame_path, last_frame_path, evt: gr.SelectData
486
  ): # SelectData is a subclass of EventData
487
  print(f"You selected {evt.value} at {evt.index} from {evt.target}")
 
 
488
  tracking_points[-1].append(evt.index)
489
 
490
  transparent_background = Image.open(first_frame_path).convert("RGBA")
 
485
  tracking_points, first_frame_path, last_frame_path, evt: gr.SelectData
486
  ): # SelectData is a subclass of EventData
487
  print(f"You selected {evt.value} at {evt.index} from {evt.target}")
488
+ if not tracking_points:
489
+ tracking_points = [[]]
490
  tracking_points[-1].append(evt.index)
491
 
492
  transparent_background = Image.open(first_frame_path).convert("RGBA")