<pre><html> <body> Detect the scene in this file: <input id="image" type="file" /> <input type="button" value="Detect Scene" onclick="detectScene(image)" /> <script> function detectScene(fileChooser) { var formData = new FormData(); formData.append('image', fileChooser.files[0]); fetch('http://localhost:5000/v1/vision/detect/scene', { method: "POST", body: formData }) .then(response => { if (response.ok) response.json().then(data => { console.log(`Scene is ${data.label}, ${data.confidence} confidence`) }); }); } </script> </body> </html>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)