my_gradio / js /app /src /routes /svelte_init.ts
xray918's picture
Upload folder using huggingface_hub
0ad74ed verified
raw
history blame contribute delete
500 Bytes
import * as svelte from "svelte";
const is_browser = typeof window !== "undefined";
if (is_browser) {
const o = {
SvelteComponent: svelte.SvelteComponent
};
for (const key in svelte) {
if (key === "SvelteComponent") continue;
if (key === "SvelteComponentDev") {
//@ts-ignore
o[key] = o["SvelteComponent"];
} else {
//@ts-ignore
o[key] = svelte[key];
}
}
window.__gradio__svelte__internal = o;
window.__gradio__svelte__internal["globals"] = {};
window.globals = window;
}