Spaces:
Runtime error
Runtime error
Commit
·
062cbf4
1
Parent(s):
bc03c32
Update main.py
Browse files
main.py
CHANGED
@@ -33,6 +33,9 @@ def draw_trace(image: np.ndarray, previous_actions: List[Tuple[str, List[int]]])
|
|
33 |
for i, (action_type, position) in enumerate(previous_actions):
|
34 |
color = (255, 0, 0) if action_type == "move" else (0, 255, 0)
|
35 |
x, y = position
|
|
|
|
|
|
|
36 |
draw.ellipse([x-2, y-2, x+2, y+2], fill=color)
|
37 |
|
38 |
if i > 0:
|
|
|
33 |
for i, (action_type, position) in enumerate(previous_actions):
|
34 |
color = (255, 0, 0) if action_type == "move" else (0, 255, 0)
|
35 |
x, y = position
|
36 |
+
if DEBUG:
|
37 |
+
x = x * 256 / 1024
|
38 |
+
y = 6 * 256 / 1024
|
39 |
draw.ellipse([x-2, y-2, x+2, y+2], fill=color)
|
40 |
|
41 |
if i > 0:
|