Spaces:
Running
Running
<title>WebGPU AI Demos</title> | |
<body> | |
<h1 align="center">WebGPU AI Demos</h1> | |
<script> | |
; | |
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); | |
let href = `${demo[1]}/index.html`; | |
if (window.location.origin.includes("hf")) { | |
href = `/${href}`; | |
} | |
td.innerHTML = `<a href=${href}>${demo[0]}</a>`; | |
td = row.insertCell(-1); | |
td.innerHTML = demo[2]; | |
} | |
</script> | |
</body> | |