You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I realize there's been a lot of talk about this in other issues, but I'm trying to gather if getting local-only model and wasm files will work with Create React App. I'm using WhisperForConditionalGeneration from @huggingface/transformers version 3.0.0-alpha.9.
This returns the SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON error that has been discussed in other issues. If I set env.allowRemoteModels = true; and env.allowLocalModels = false;, and clear my application cache, this works fine. My questions on that:
How can I get the model files to only call locally? (we will need to further train our own models). I have yet to get this working, but I assume the above error is to blame.
The main question: is this a limitation with CRA? I noticed that if I load the wasm file from the CDN first, it caches fine locally. It's just that initial call to the wasm local file (if not cached from the CDN) that fails, which people have said may be a CRA issue.
Thanks! Sorry for the long-winded question. Happy to provide any more code if needed.
The text was updated successfully, but these errors were encountered:
Question
I realize there's been a lot of talk about this in other issues, but I'm trying to gather if getting local-only model and wasm files will work with Create React App. I'm using
WhisperForConditionalGeneration
from@huggingface/transformers
version3.0.0-alpha.9
.My setup:
... and in my
{packagename}/public/models
folder I've got:This returns the
SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
error that has been discussed in other issues. If I setenv.allowRemoteModels = true;
andenv.allowLocalModels = false;
, and clear my application cache, this works fine. My questions on that:wasm
file to load locally only? It caches fine and calls locally (http://localhost:3000/dictation/ort-wasm-simd-threaded.jsep.wasm) after the initial CDN call, but I don't want to rely on an external CDN.
Thanks! Sorry for the long-winded question. Happy to provide any more code if needed.
The text was updated successfully, but these errors were encountered: