From ea43b2f086bc82e11cb3522c592a2952ddf91f67 Mon Sep 17 00:00:00 2001 From: Jonas Weinz Date: Sun, 11 Sep 2022 10:42:04 +0200 Subject: [PATCH] sync local changes to devel branch --- examples/sobel_filter/index.html | 5 ++--- examples/sobel_filter/main.py | 9 +++++++-- pyscript_bootstrap_templates/create.py | 5 ++--- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/examples/sobel_filter/index.html b/examples/sobel_filter/index.html index 3cb0fad..0ec187b 100644 --- a/examples/sobel_filter/index.html +++ b/examples/sobel_filter/index.html @@ -5,13 +5,12 @@ + + - - - sobel_filter diff --git a/examples/sobel_filter/main.py b/examples/sobel_filter/main.py index 065403e..d188cbf 100644 --- a/examples/sobel_filter/main.py +++ b/examples/sobel_filter/main.py @@ -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") diff --git a/pyscript_bootstrap_templates/create.py b/pyscript_bootstrap_templates/create.py index 8752008..c65282a 100644 --- a/pyscript_bootstrap_templates/create.py +++ b/pyscript_bootstrap_templates/create.py @@ -41,13 +41,12 @@ def create_project(root_folder: pathlib.Path, + + - - - {title}