feat: python code execution

This commit is contained in:
Timothy J. Baek
2024-05-16 17:49:28 -10:00
parent ba61f87a2f
commit 58a13aec7e
67 changed files with 1918 additions and 11 deletions

View File

@@ -12,6 +12,10 @@
title="Open WebUI"
href="/opensearch.xml"
/>
<script type="module" src="/pyscript/core.js"></script>
<link rel="stylesheet" href="/pyscript/core.css" />
<script>
// On page load or when changing themes, best to add inline in `head` to avoid FOUC
(() => {
@@ -54,6 +58,11 @@
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
<py-config> interpreter = "/pyodide/pyodide.mjs" </py-config>
<script type="py">
print('pyscript:loaded')
</script>
<div style="display: contents">%sveltekit.body%</div>
<div