I am writting an app using MAUI Blazor and I’m trying to load a model locally on my phone. However, everytime it hits the line var model = new Model(modelPath);
, it throws the exception System.DllNotFoundException "onnxruntime-genai".
I have tried copying dll files multiple times, using them, installing the package on multiple projects but nothing worked.
To reproduce
To reproduce, you may try to load a local model by copying it to your phone and using
string modelPath = "/storage/emulated/0/onnx/cpu_and_mobile/cpu-int4-rtn-block-32";
Then simply load the model with the line var model = new Model(modelPath);
, all this while debugging with your phone via USB.
Visual Studio Community Version 17.10.0