Skip to content

A live bird collage card for your Home Assistant dashboard.

cleanup loading of M_INTERPRETER

frederikb4e8fee59e2d
diff --git a/model/BirdNET_GLOBAL_6K_V2.4_MData_Model_V2_FP16.tflite b/model/BirdNET_GLOBAL_6K_V2.4_MData_Model_V2_FP16.tflite
new file mode 100644
index 00000000..f5c31526
Binary files /dev/null and b/model/BirdNET_GLOBAL_6K_V2.4_MData_Model_V2_FP16.tflite differ
diff --git a/scripts/server.py b/scripts/server.py
index 729eb29b..11fa9c84 100755
--- a/scripts/server.py
+++ b/scripts/server.py
@@ -22,7 +22,7 @@ log = logging.getLogger(__name__)
userDir = os.path.expanduser('~')
-INTERPRETER, INCLUDE_LIST, EXCLUDE_LIST = (None, None, None)
+INTERPRETER, M_INTERPRETER, INCLUDE_LIST, EXCLUDE_LIST = (None, None, None, None)
PREDICTED_SPECIES_LIST = []
model, priv_thresh, sf_thresh = (None, None, None)
@@ -92,10 +92,7 @@ def predictFilter(lat, lon, week):
global M_INTERPRETER
# Does interpreter exist?
- try:
- if M_INTERPRETER is None:
- loadMetaModel()
- except Exception:
+ if M_INTERPRETER is None:
loadMetaModel()
# Prepare mdata as sample