TensorFlow.js in a Chrome Extension

550 views
Skip to first unread message

Breno Brito Cruz

unread,
Nov 23, 2020, 10:23:08 AM11/23/20
to TensorFlow.js Discussion
Hi, Good Morning for all!

I see that there is little issue related to the application of TensorFlow.js in a chrome extension,

Could anyone suggest ways to learn how to solve this? what was the learning process that you did.


I will be very grateful for the answer.
Because I'm having a hard time using tfjs in a web extension, and even testing an application related to this on the TensorFlow.js github (application link:
)

Stan Bileschi

unread,
Nov 24, 2020, 10:59:00 AM11/24/20
to TensorFlow.js Discussion, brenob...@gmail.com
Hi,

Can you please say more about the issue?

Thanks,
Stan

Breno Brito Cruz

unread,
Dec 2, 2020, 9:26:37 AM12/2/20
to TensorFlow.js Discussion, Stan Bileschi
yes I can.
I started by trying to use the Github example from TensorFlow.js, called chrome extension.
1. I did the yarn in the folder, as there is in the step by step. (Everything went well)
2. I did the yarn build in the folder. (went wrong)
this appeared in the yarn build:

tfjs.jpg

then I went to chrome: // extension, activated developer mode, and tried to use the extension by going to the file folder.
and the following error appeared:
Captura de tela 2020-12-02 111426.jpg
in english:
Archive
~ \ Desktop \ tfjs-examples \ chrome-extension
Error+
Could not load "src / content.js" in javascript for the content script.
The manifest could not be loaded.

I can't find a step by step regarding chrome extension,
can anybody help me with this problem? (I already went to StackOverflow, but nothing was answered)

Oleksandr Paraska

unread,
Dec 16, 2020, 6:25:28 AM12/16/20
to TensorFlow.js Discussion, brenob...@gmail.com, Stan Bileschi
Looks like the example is just not well adapted to Windows. `cp` is not available in regular command line, but perhaps you can try building in PowerShell? Alternatively you can try building in WSL [1].

Or you can just replace the `cp` with `copy` in the build steps [2].

Oleksandr.

середа, 2 грудня 2020 р. о 15:26:37 UTC+1 brenob...@gmail.com пише:

Stan Bileschi

unread,
Dec 16, 2020, 10:19:08 AM12/16/20
to Oleksandr Paraska, TensorFlow.js Discussion, brenob...@gmail.com
+1

The build script depends on `cp`.  Is there a common way to make these types of build scripts sensitive to both *nix & Windows OS?
--
Stan Bileschi Ph.D.  |  SWE  | bile...@google.com | 617-230-8081

Reply all
Reply to author
Forward
0 new messages