Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can 'public/tflite' files be used in other projects? (tflite.wasm, tflite.js) #53

Open
bedcoding opened this issue Feb 2, 2023 · 2 comments

Comments

@bedcoding
Copy link

bedcoding commented Feb 2, 2023

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?

@bedcoding bedcoding changed the title Can 'public/tflite' files be used in other projects? (tflite.wasm, tflite.js ...) Can 'public/tflite' files be used in other projects? (tflite.wasm, tflite.js) Feb 8, 2023
@Volcomix
Copy link
Owner

Volcomix commented Feb 9, 2023

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.

@bedcoding
Copy link
Author

bedcoding commented Feb 9, 2023

i get it. I used it like this.

  1. Insert 4 files in public folder.
  2. Call js file in index.html file in public folder.
  3. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants