diff --git a/src/Python/flask/web/app.py b/src/Python/flask/web/app.py index 7a73f3d..5efbb30 100644 --- a/src/Python/flask/web/app.py +++ b/src/Python/flask/web/app.py @@ -160,7 +160,11 @@ def image(): @app.route('/yolo_results', methods=['GET']) def yolo_results_endpoint(): - global yolo_results + global yolo_results + return jsonify(yolo_results) + +def yolo_results_db(): + global yolo_results with lock: try: db = get_db() @@ -175,8 +179,6 @@ def yolo_results_endpoint(): print(f"Database error: {err}") except Exception as e: print(f"Unexpected error: {e}") - - return jsonify(yolo_results) if __name__ == '__main__': app.run(debug=True, port=5000) \ No newline at end of file