mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-03 11:55:00 +00:00
seperate yolo results because it updates now only when going to /yolo_results
This commit is contained in:
@@ -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)
|
Reference in New Issue
Block a user