mirror of
https://gitlab.fdmci.hva.nl/technische-informatica-sm3/ti-projectten/rooziinuubii79.git
synced 2025-08-05 12:54:57 +00:00
seperate yolo results because it updates now only when going to /yolo_results
This commit is contained in:
@@ -160,6 +160,10 @@ def image():
|
||||
|
||||
@app.route('/yolo_results', methods=['GET'])
|
||||
def yolo_results_endpoint():
|
||||
global yolo_results
|
||||
return jsonify(yolo_results)
|
||||
|
||||
def yolo_results_db():
|
||||
global yolo_results
|
||||
with lock:
|
||||
try:
|
||||
@@ -176,7 +180,5 @@ def yolo_results_endpoint():
|
||||
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