sync local changes to devel branch

This commit is contained in:
Jonas Weinz 2022-09-11 10:42:04 +02:00
parent 2ef3d3fa4f
commit ea43b2f086
3 changed files with 11 additions and 8 deletions

View File

@ -5,13 +5,12 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./resources/pyscript.css" />
<script defer src="./resources/pyscript.js"></script>
<!-- Bootstrap CSS -->
<link href="./resources/bootstrap.css" rel="stylesheet">
<link rel="stylesheet" href="./resources/pyscript.css" />
<script defer src="./resources/pyscript.js"></script>
<title>sobel_filter</title>
<py-env>

View File

@ -20,10 +20,15 @@ def sobel_image(img):
return ((255 * img_sobel) / img_sobel.max()).astype(np.uint8)
app = bootstrap_templates.PyScriptBootstrapDashboard(parent_element="pyscript_app", brand_name="Image Filter Example")
app = bootstrap_templates.PyScriptBootstrapDashboard(parent_element="pyscript_app", brand_name="Sobel Filter Example")
HTML.H3("upload an image:", parent=app.sidebar)
HTML.H3("filtered image:", parent=app.main_area)
image_input = bInputs.InputFile(label_text="choose image file", parent=app.sidebar)
image_input.set_attribute("accept", "image/*")
image_input._input.set_attribute("accept", "image/*") # TODO: write wrapper for this
def on_image_change(f, *args):
print("image changed")

View File

@ -41,13 +41,12 @@ def create_project(root_folder: pathlib.Path,
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./resources/pyscript.css" />
<script defer src="./resources/pyscript.js"></script>
<!-- Bootstrap CSS -->
<link href="./resources/bootstrap.css" rel="stylesheet">
<link rel="stylesheet" href="./resources/pyscript.css" />
<script defer src="./resources/pyscript.js"></script>
<title>{title}</title>
<py-env>