@@ -923,6 +923,7 @@ def csv_to_coco(detections_df, files_df, output_path):
923
923
924
924
# create dict with country codes for speciesnet
925
925
countries = [
926
+ "NONE \tDon't filter by regional taxa and allow all species to be present in the results",
926
927
"ABW \tAruba",
927
928
"AFG \tAfghanistan",
928
929
"AGO \tAngola",
@@ -1222,6 +1223,7 @@ def csv_to_coco(detections_df, files_df, output_path):
1222
1223
"ZMB \tZambia",
1223
1224
"ZWE \tZimbabwe"
1224
1225
]
1226
+
1225
1227
# for simplicity, the same list is used for both english as spanish I'll fix everything properly in the new version
1226
1228
dpd_options_sppnet_location = [countries, countries]
1227
1229
@@ -4885,10 +4887,11 @@ def deploy_speciesnet(chosen_folder, sppnet_output_window, simple_mode = False):
4885
4887
# get location information
4886
4888
location_args = []
4887
4889
country_code = var_sppnet_location.get()[:3]
4888
- location_args.append(f"--country={country_code}")
4889
- if country_code == "USA":
4890
- state_code = var_sppnet_location.get()[4:6]
4891
- location_args.append(f"--admin1_region={state_code}")
4890
+ if country_code != "NON": # only add location args if not selected 'NONE' option
4891
+ location_args.append(f"--country={country_code}")
4892
+ if country_code == "USA":
4893
+ state_code = var_sppnet_location.get()[4:6]
4894
+ location_args.append(f"--admin1_region={state_code}")
4892
4895
write_global_vars({
4893
4896
"var_sppnet_location_idx": dpd_options_sppnet_location[lang_idx].index(var_sppnet_location.get())
4894
4897
})
0 commit comments