From 2685171e75acac0a66aab277b635477f42b3b74e Mon Sep 17 00:00:00 2001 From: ehpersonal38 <103586016+ehpersonal38@users.noreply.github.com> Date: Mon, 16 Jan 2023 12:40:23 -0500 Subject: [PATCH] Update server.py --- scripts/server.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/server.py b/scripts/server.py index ae3d5d4..390d305 100755 --- a/scripts/server.py +++ b/scripts/server.py @@ -156,7 +156,9 @@ def predictSpeciesList(lat, lon, week): l_filter = explore(lat, lon, week) for s in l_filter: if s[0] >= float(sf_thresh): - PREDICTED_SPECIES_LIST.append(s[1]) + #if there's a custom user-made include list, we only want to use the species in that + if(len(INCLUDE_LIST) == 0): + PREDICTED_SPECIES_LIST.append(s[1]) def loadCustomSpeciesList(path): @@ -269,7 +271,7 @@ def analyzeAudioData(chunks, lat, lon, week, sensitivity, overlap,): print('ANALYZING AUDIO...', end=' ', flush=True) if model == "BirdNET_GLOBAL_3K_V2.2_Model_FP16": - if len(PREDICTED_SPECIES_LIST) == 0: + if len(PREDICTED_SPECIES_LIST) == 0 or len(INCLUDE_LIST) != 0: predictSpeciesList(lat,lon,week)