unable to initialize model
Closed this issue · 2 comments
Hi there - I'm running into an error with birdnetR when it comes to initializing a model (failing to download).
library(reticulate)
library(birdnetR)
# need to use version 3.11 according to some previous errors
use_python('C:/Users/jmwin/AppData/Local/Programs/Python/Python311')
# create virtual environment
virtualenv_create(envname = "birdnet_env")
# set virtual environment
use_virtualenv('birdnet_env')
# install birdnet
install_birdnet()
# initialize model
model <- init_model(tflite_num_threads = NULL, language = 'en_us')
It gets most of the way through downloading the model, with this error:
Downloading model: 76.8MiB [00:13, 5.75MiB/s]
Error in py_call_impl(callable, call_args$unnamed, call_args$named) :
ValueError: Failed to download the file. Status code: 200
I struggled a bit to get Python set up (Windows user) so maybe my issue is related to that, but just wanted to share anyway.
Thanks,
Jay
Please install the newest version of birdnetR
and see if it solves the problem:
devtools::install_github("birdnet-team/birdnetR")
Note that the API has changed from init_model()
to a function family birdnet_model_*()
Visit the Get Started
guide for more info
https://birdnet-team.github.io/birdnetR/
That worked, thanks!