Spaces:
Running
on
Zero
Running
on
Zero
Update
Browse files
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")
|