Spaces:
Runtime error
Runtime error
Update visualization.py
Browse files- visualization.py +2 -1
visualization.py
CHANGED
|
@@ -268,7 +268,8 @@ def create_video_with_heatmap(video_path, df, mse_embeddings, mse_posture, mse_v
|
|
| 268 |
def create_heatmap(t):
|
| 269 |
frame_count = int(t * video.fps)
|
| 270 |
|
| 271 |
-
|
|
|
|
| 272 |
ax.lines.pop(0)
|
| 273 |
ax.axvline(x=frame_count, color='blue', linewidth=2)
|
| 274 |
|
|
|
|
| 268 |
def create_heatmap(t):
|
| 269 |
frame_count = int(t * video.fps)
|
| 270 |
|
| 271 |
+
# Clear previous lines
|
| 272 |
+
if hasattr(ax, 'lines') and len(ax.lines) > 0:
|
| 273 |
ax.lines.pop(0)
|
| 274 |
ax.axvline(x=frame_count, color='blue', linewidth=2)
|
| 275 |
|