demos / index.html
Yang Gu
Try to fix the link
3cbf64a
raw
history blame
1.15 kB
<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]}>/${demo[0]}/index.html</a>`;
td = row.insertCell(-1);
td.innerHTML = demo[2];
}
</script>
</body>