Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

152
Views
tfjs-tflite demo on codepen does not seem to process the image

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).

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

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].

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!