Spaces:
Running
Running
File size: 1,146 Bytes
afed82d 5b4769b afed82d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
<title>WebGPU AI Demos</title>
<body>
<h1 align="center">WebGPU AI Demos</h1>
<script src="main.js"></script>
<script>
"use strict";
const demos = [["LLMs with MediaPipe and TFLite", "llm-inference", "<a href=https://github.com/googlesamples/mediapipe/tree/main/examples/llm_inference/js>original code</a>, <a href=https://developers.googleblog.com/2024/03/running-large-language-models-on-device-with-mediapipe-andtensorflow-lite.html>more info</a>"]];
// table
const table = document.createElement("table");
table.align = "center";
table.style.width = "80%";
table.setAttribute("border", "1");
document.body.appendChild(table);
// first line
let row = table.insertRow(-1);
const headers = ["Name", "Description"];
row.style.fontWeight = "bold";
for (let header of headers) {
let td = row.insertCell(-1);
td.innerHTML = header;
}
// rest of lines
for (let demo of demos) {
row = table.insertRow(-1);
let td = row.insertCell(-1);
td.innerHTML = `<a href=/${demo[1]}/index.html>${demo[0]}</a>`;
td = row.insertCell(-1);
td.innerHTML = demo[2];
}
</script>
</body>
|