Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

160
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda