For reference: I built the wasm module as outlined here under the 'Fasttext WebAssembly integration' heading.
The main reason I even considered running fasttext in a web worker is that while I managed to load and run inference on a model on the main thread, the loadModel() function blocks (and hence freezes the UI) for around 2 to 3 seconds. I would really appreciate any workaround that would solve this issue.
Hello,
I was wondering: should it be possible to run the web assembly version of fasttext in a web worker?
I tried using it inside a web worker myself, but got errors like this (logs copied from the developer console of my machine):
For reference: I built the wasm module as outlined here under the 'Fasttext WebAssembly integration' heading.
The main reason I even considered running fasttext in a web worker is that while I managed to load and run inference on a model on the main thread, the
loadModel()
function blocks (and hence freezes the UI) for around 2 to 3 seconds. I would really appreciate any workaround that would solve this issue.Best regards, Samo