Guest User

index.html

a guest
May 17th, 2021
221
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3.     <script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs/dist/tf.min.js"> </script>    <!-- Load the MobileNet model. -->
  4. <script src="https://cdn.jsdelivr.net/npm/@tensorflow-models/mobilenet"></script>
  5. <title>Image classification using tensorflow.js</title>
  6. <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css"
  7.        integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
  8. <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
  9.  
  10.         <!-- Load index.js after the content of the page -->
  11. <script src="index.js"></script>
  12. </head>
  13. <body>
  14.     <main>
  15.         <div class="container mt-5">
  16.             <div class="row">
  17.                 <div class="col-6">
  18.                     <input id="image-selector" class="form-control border-0" type="file" onchange="PreviewImage();"/>
  19.                 </div>
  20.                 <div class="col-6">
  21.                     <button id="predict-button" class="btn btn-dark float-right" onclick="getPred()">Predict</button>
  22.                 </div>
  23.             </div>
  24.             <hr>
  25.             <div class="row">
  26.                 <div class="col-6">
  27.                     <h2 class="ml-3">Image</h2>
  28.                     <img id="selected-image" style="width: 250px; height: 250px;" class="ml-3" src="https://networkprogramming.files.wordpress.com/2019/02/content.jpg" />
  29.                 </div>
  30.                 <div class="col-6">
  31.                     <h2 class="ml-3">Predictions</h2>
  32.                     <ol id="prediction-list"></ol>
  33.                 </div>
  34.             </div>
  35.         </div>
  36.     </main>    
  37. </body>
  38. </html>
RAW Paste Data