spaceforge / templates /widget /loader.js
2Btainment's picture
Upload folder using huggingface_hub
3806142 verified
Raw History Blame Contribute Delete
562 Bytes
(function () {
const root = document.getElementById("sf-root");
if (!root) return;
const url = root.dataset.embed || "{{EMBED_URL}}";
const iframe = document.createElement("iframe");
iframe.src = url;
iframe.title = root.dataset.repo || "Hugging Face Space";
iframe.allow = "accelerometer; camera; microphone; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share";
iframe.allowFullscreen = true;
iframe.referrerPolicy = "strict-origin-when-cross-origin";
iframe.className = "sf-frame";
root.appendChild(iframe);
})();