From 917b4c0fe4df828f386554204a111bb4de6e2d52 Mon Sep 17 00:00:00 2001 From: Onuralp SEZER Date: Thu, 14 Mar 2024 22:33:30 +0300 Subject: [PATCH] =?UTF-8?q?doc:=20=F0=9F=93=9A=20json=20and=20csv=20exampl?= =?UTF-8?q?e=20code=20syntax=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Onuralp SEZER --- supervision/detection/tools/csv_sink.py | 2 +- supervision/detection/tools/json_sink.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/supervision/detection/tools/csv_sink.py b/supervision/detection/tools/csv_sink.py index ba0dde97..1e1f2940 100644 --- a/supervision/detection/tools/csv_sink.py +++ b/supervision/detection/tools/csv_sink.py @@ -42,7 +42,7 @@ class CSVSink: csv_sink = sv.CSVSink() frames_generator = sv.get_video_frames_generator() - with csv_sink: + with csv_sink as sink: for frame in frames_generator: result = model(frame)[0] detections = sv.Detections.from_ultralytics(result) diff --git a/supervision/detection/tools/json_sink.py b/supervision/detection/tools/json_sink.py index 1ff5f900..9e73554b 100644 --- a/supervision/detection/tools/json_sink.py +++ b/supervision/detection/tools/json_sink.py @@ -32,7 +32,7 @@ class JSONSink: json_sink = sv.JSONSink() frames_generator = sv.get_video_frames_generator() - with json_sink: + with json_sink as sink: for frame in frames_generator: result = model(frame)[0] detections = sv.Detections.from_ultralytics(result)