From 4c9292de2f0ab08fa190296d85b9b0224de86133 Mon Sep 17 00:00:00 2001 From: rendies Date: Thu, 12 Jan 2023 19:57:27 +0700 Subject: [PATCH] fix: polishing code --- RunCounting.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RunCounting.py b/RunCounting.py index b0525b3..2ef21c8 100644 --- a/RunCounting.py +++ b/RunCounting.py @@ -31,7 +31,7 @@ args = None def counter(): # return the rendered template global people_count - return jsonify(people_count) + return jsonify({counter: people_count}) @app.route("/video") @cross_origin() @@ -290,7 +290,7 @@ def PeopleCounter(): cv2.putText(frame, text, (centroid[0] - 10, centroid[1] - 10), cv2.FONT_HERSHEY_SIMPLEX, 0.5, (255, 255, 255), 2) cv2.circle(frame, (centroid[0], centroid[1]), 4, (255, 255, 255), -1) - people_count = {counter: totalDown} + people_count = totalDown # construct a tuple of information we will be displaying on the info = [ ("Exit", totalUp),