fix issue#1353 (#1457)

* fix issue#1353

* change logic

* changes

Co-authored-by: Ali Abid <aabid94@gmail.com>
This commit is contained in:
Chih-Yu Yeh 2022-06-06 22:58:19 +08:00 committed by GitHub
parent d8eb957534
commit f6414d3c33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 8 deletions

View File

@ -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

View File

@ -1 +1 @@
3.0.11
3.0.12

View File

@ -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,

View File

@ -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));
}

View File

@ -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 "
>
<input
bind:checked={value}
on:change={(evt) => handle_change(evt)}
{disabled}
type="checkbox"
name="test"