Spaces:
Running
on
Zero
Running
on
Zero
Add error handling
Browse files
app.py
CHANGED
@@ -498,7 +498,8 @@ def delete_last_drag(tracking_points, first_frame_path, drag_mode):
|
|
498 |
color = (255, 0, 0, 255)
|
499 |
elif drag_mode == "camera":
|
500 |
color = (0, 0, 255, 255)
|
501 |
-
tracking_points
|
|
|
502 |
transparent_background = Image.open(first_frame_path).convert("RGBA")
|
503 |
w, h = transparent_background.size
|
504 |
transparent_layer = np.zeros((h, w, 4))
|
|
|
498 |
color = (255, 0, 0, 255)
|
499 |
elif drag_mode == "camera":
|
500 |
color = (0, 0, 255, 255)
|
501 |
+
if tracking_points:
|
502 |
+
tracking_points.pop()
|
503 |
transparent_background = Image.open(first_frame_path).convert("RGBA")
|
504 |
w, h = transparent_background.size
|
505 |
transparent_layer = np.zeros((h, w, 4))
|