Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

285
Vistas
Why script with Tensorflow.js src doesn't work?

If I remove src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs/dist/tf.min.js" then it shows my alert. What's wrong?

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> Brain Tumor </title>
<link rel="stylesheet" type="text/css" href="style.css">

<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs/dist/tf.min.js">
alert("alert"); // doesn't work if there's src

/*async function LoadModels(){  
           model = undefined;
           model = await tf.loadLayersModel("D:/user/diploma/models/models/model.json");
           const image = tf.fromPixels("D:/user/diploma/IM-0115-0001.jpeg");
           const prediction = model.predict(image);
           alert(prediction);
       }
       LoadModels();*/

</script>

</head>
...
</html>

EDIT:enter image description here

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You have to add alert in another script tag.

    <script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs/dist/tf.min.js"></script>
<script>
alert("alert");
</script>
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda