I am trying to get a tfjs-tflite demo from here
to get it to work on codepen here
I think here is where the problem is:
eles(".trigger").forEach((ele) => {
ele.addEventListener("click", (event) => {
const trigger = event.target! as HTMLElement;
trigger.classList.add("processing");
trigger.innerHTML = "Processing...";
setTimeout(() => {
handleClickTrigger(trigger, tfliteModel);
trigger.classList.add("hide");
});
});
});
The goal is to cartoonise the image on the top row and generate its corresponding cartoon via GAN on the second row.You can see here an official example of what the result should look like: https://storage.googleapis.com/tfweb/demos/cartoonizer/index.html
For some reason, it does not seem to produce a result :(
Any clue as to why this is would be greatly appreciated (I am a JS newbie).
If you simply copy-paste over the index.html and other source files to the codepen, it won't work as there are other dependencies the source codes rely on (for example, tfjs-core).
Please follow the README.md in the demo repo: https://github.com/tensorflow/tfjs/tree/master/tfjs-tflite/demo to properly reproduce it on your local machine. The demo recommends using Yarn [tutorial here].