Closed Vinayak006 closed 1 month ago
Yes, of course, load it once and then use it. I don't see the need for the path in init, especially since this will only work for Android. Load from assets method was added to simplify such loading, probably I need to explain it better in readme, not to confuse people
I can't see the latest release code. Is it keeping the loaded model locally for later use? If not, instead of loading the model from the network every time the application is closed and reopened, we could download the model from the server once and save it locally in the application's support or document directory. This way, we can use the local path for initialization in future app launches. Also, we can't keep the model in the assets due to the larger APK size, and loading it from assets isn't an option either
You don't need to load the model every time, you can load it once and use. Opportunity with assets is not for production, for debug purposes only, so APK size is doesn't matter, you can't use it in release.
I'll update an example to show you how to use it properly
I've seen the updated README and the example. They are clear and well-explained. :+1:
The
modelPath
parameter should be moved to theinit
method, as the model doesn't need to be loaded from assets. Instead, the model can be downloaded during the first-time use, saved locally, and the saved path can be passed during initialization for future use.This change ensures flexibility by allowing the model to be dynamically downloaded, stored locally, and reused without needing to rely on a static asset path.