Spaces:
bla
/
Runtime error

bla commited on
Commit
99d098f
·
verified ·
1 Parent(s): 1affb38

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -245,7 +245,7 @@ def clear_points(session_state):
245
  # After resetting the state, we need to re-initialize it to be ready for new points.
246
  # Pass the original video path stored in the state.
247
  if "video_path" in session_state["inference_state"] and session_state["inference_state"]["video_path"] is not None:
248
- session_state["inference_state"] = predictor.init_state(video_path=session_state["inference_state"]["video_path"], device="cpu")
249
  else:
250
  # This case should ideally not happen if preprocess_video_in ran correctly
251
  print("Warning: Could not re-initialize state after clear_points (video_path missing).")
 
245
  # After resetting the state, we need to re-initialize it to be ready for new points.
246
  # Pass the original video path stored in the state.
247
  if "video_path" in session_state["inference_state"] and session_state["inference_state"]["video_path"] is not None:
248
+ session_state["inference_state"] = predictor.init_state(video_path=session_state["inference_state"]["video_path"])
249
  else:
250
  # This case should ideally not happen if preprocess_video_in ran correctly
251
  print("Warning: Could not re-initialize state after clear_points (video_path missing).")