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

286
Views
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 answers
Answer question

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 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!