react-native-transformers-example icon indicating copy to clipboard operation
react-native-transformers-example copied to clipboard

Where should I put my onnx files?

Open piroposantosdev opened this issue 10 months ago • 3 comments

I found no referece where should I put my onnx file in this project, i built the app to IOS but can't teste any model because there is no onnx file in the project.. @hans00

piroposantosdev avatar Feb 03 '25 15:02 piroposantosdev

They are put on huggingface. If you use custom model, see here

hans00 avatar Feb 04 '25 02:02 hans00

They are put on huggingface. If you use custom model, see here

thanks for your reply, but i don't understand a thing, is this project getting the model online? To be clearer, I built the app, don't I need to set any onnx in any folder? I built the app and tried to make it works but no model was loaded and nothing was working in the app

piroposantosdev avatar Feb 06 '25 11:02 piroposantosdev

thanks for your reply, but i don't understand a thing, is this project getting the model online?

transformers.js will download model from huggingface or load from local path. If you need bundle model into app, you can try:

  1. Store model as assets
  2. Resolve assets absolute path or copy assets into data path
  3. load model: pipeline('task-name', '/path/to/model/dir')

hans00 avatar Jul 05 '25 16:07 hans00