fix(dashboard): PUT the handoff bundle through the app's API base #9

Merged
pedro-bento merged 5 commits from fix/handoff-upload-url into main 2026-10-05 21:37:21 +01:00
Showing only changes of commit 158b40071b - Show all commits

View file

@ -106,7 +106,9 @@ def _detect_transnetv2(video_path):
threshold = float(os.environ.get("TRANSNETV2_THRESHOLD", "0.5")) threshold = float(os.environ.get("TRANSNETV2_THRESHOLD", "0.5"))
with _TN2_LOCK, torch.no_grad(): with _TN2_LOCK, torch.no_grad():
tensor = torch.from_numpy(np.ascontiguousarray(frames)).to(model.device) # frombuffer() yields a read-only array; copy so torch stops warning and
# writing to the tensor is well-defined.
tensor = torch.from_numpy(np.array(frames, copy=True)).to(model.device)
single_frame_pred, _ = model.predict_frames(tensor, quiet=True) single_frame_pred, _ = model.predict_frames(tensor, quiet=True)
single_frame_pred = single_frame_pred.cpu() single_frame_pred = single_frame_pred.cpu()
del tensor del tensor