virtual-background
virtual-background copied to clipboard
Can 'public/tflite' files be used in other projects? (tflite.wasm, tflite.js)
Hello, I have a question because there are unfamiliar files in the public/tflite path. (Example: tflite.wasm, tflite.js) If I create a new react project with 'npx create-react-app' command, can I use 'import ... from ...' and use those files as they are?
- File location: https://github.com/Volcomix/virtual-background/tree/main/public/tflite
- Related questions: https://community.jitsi.org/t/virtual-background-how-do-i-use-the-tflite-js-file-in-jitsi-open-source/120858
Hi, I haven't found yet how to import the tflite through ES imports. So for now I ended up putting them into the public directory and including it directly as scripts in the HTML file. There is a similar discussion in #16 where you might find some more details.
i get it. I used it like this.
- Insert 4 files in public folder.
- Call js file in index.html file in public folder.
- Use like a global variable. const createTFLiteModule = window.createTFLiteModule; const createTFLiteSIMDModule = window.createTFLiteSIMDModule; https://github.com/jitsi/jitsi-meet/blob/master/react/features/stream-effects/virtual-background/index.js