candle-yolo / build /index.html
laurent
Add a build directory with the lib version.
4f3c44a
raw
history blame
689 Bytes
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type"/>
</head>
<body>
<script type="module">
import init, { Model } from './m.js';
await init();
const yolo_response = await fetch('../yolo.safetensors');
const yolo_data = await yolo_response.arrayBuffer();
const model_weights = new Uint8Array(yolo_data);
let m = new Model(model_weights);
const img_response = await fetch('../bike.jpeg');
const img_data = await img_response.arrayBuffer();
let image_data = new Uint8Array(img_data);
let bboxes = m.run(image_data);
console.log(bboxes);
</script>
</body>
</html>