A fork of mtelver's day10 project
at main2 28 lines 859 B view raw
1<!DOCTYPE html> 2<html lang="en"> 3<head> 4 <meta charset="utf-8" /> 5 <title>onnxrt browser example</title> 6 <style> 7 body { font-family: monospace; margin: 2em; background: #1e1e1e; color: #d4d4d4; } 8 h1 { color: #569cd6; } 9 pre { background: #2d2d2d; padding: 1em; border-radius: 4px; } 10 </style> 11</head> 12<body> 13 <h1>onnxrt inference example</h1> 14 <p>Adding two float32 tensors: A=[1,2,3] + B=[4,5,6]</p> 15 <pre id="output">Loading ONNX Runtime... 16</pre> 17 18 <!-- Load ONNX Runtime Web from CDN --> 19 <script src="https://cdn.jsdelivr.net/npm/onnxruntime-web@1.21.0/dist/ort.min.js"></script> 20 <script> 21 // Configure WASM paths to use CDN 22 ort.env.wasm.wasmPaths = "https://cdn.jsdelivr.net/npm/onnxruntime-web@1.21.0/dist/"; 23 </script> 24 25 <!-- Load compiled OCaml JS --> 26 <script src="inference_example.bc.js"></script> 27</body> 28</html>