From f6414d3c33231aeacb2873ebb61323d5c2809f00 Mon Sep 17 00:00:00 2001 From: Chih-Yu Yeh Date: Mon, 6 Jun 2022 22:58:19 +0800 Subject: [PATCH] fix issue#1353 (#1457) * fix issue#1353 * change logic * changes Co-authored-by: Ali Abid --- gradio.egg-info/PKG-INFO | 2 +- gradio/version.txt | 2 +- setup.py | 2 +- ui/packages/app/src/api.ts | 1 - ui/packages/form/src/Checkbox.svelte | 8 ++++---- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/gradio.egg-info/PKG-INFO b/gradio.egg-info/PKG-INFO index 91d932b1f8..9129cbc45f 100644 --- a/gradio.egg-info/PKG-INFO +++ b/gradio.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: gradio -Version: 3.0.11 +Version: 3.0.12 Summary: Python library for easily interacting with trained machine learning models Home-page: https://github.com/gradio-app/gradio Author: Abubakar Abid, Ali Abid, Ali Abdalla, Dawood Khan, Ahsen Khaliq, Pete Allen, Ömer Faruk Özdemir diff --git a/gradio/version.txt b/gradio/version.txt index e4a0720dd5..d003324bf6 100644 --- a/gradio/version.txt +++ b/gradio/version.txt @@ -1 +1 @@ -3.0.11 \ No newline at end of file +3.0.12 \ No newline at end of file diff --git a/setup.py b/setup.py index bc45e14480..7c6b9b8b65 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ long_description = (this_directory / "README.md").read_text(encoding='utf8') setup( name="gradio", - version="3.0.11", + version="3.0.12", include_package_data=True, description="Python library for easily interacting with trained machine learning models", long_description=long_description, diff --git a/ui/packages/app/src/api.ts b/ui/packages/app/src/api.ts index 11440d5ff2..7613d26d58 100644 --- a/ui/packages/app/src/api.ts +++ b/ui/packages/app/src/api.ts @@ -68,7 +68,6 @@ export const fn = async ( ) => { const fn_index = payload.fn_index; - console.log(">", frontend_fn); if (frontend_fn !== undefined) { payload.data = await frontend_fn(payload.data.concat(output_data)); } diff --git a/ui/packages/form/src/Checkbox.svelte b/ui/packages/form/src/Checkbox.svelte index 2001d1b3fe..e47fabdf16 100644 --- a/ui/packages/form/src/Checkbox.svelte +++ b/ui/packages/form/src/Checkbox.svelte @@ -11,9 +11,9 @@ const dispatch = createEventDispatcher<{ change: boolean }>(); - function handle_change() { - dispatch("change", !value); - value = !value; + function handle_change(evt: Event) { + value = evt.target?.checked; + dispatch("change", value); } $: ({ rounded, border } = get_styles(style, ["rounded", "border"])); @@ -25,7 +25,7 @@ class="flex items-center text-gray-700 text-sm space-x-2 rounded-lg cursor-pointer dark:bg-transparent " > handle_change(evt)} {disabled} type="checkbox" name="test"