Spaces:
Running
on
Zero
Running
on
Zero
update ui
Browse files
app.py
CHANGED
@@ -102,7 +102,7 @@ def main_fn(
|
|
102 |
n_neighbors=500,
|
103 |
min_dist=0.1,
|
104 |
):
|
105 |
-
if len(images)
|
106 |
return [], example_items
|
107 |
|
108 |
if perplexity >= num_sample_tsne or n_neighbors >= num_sample_tsne:
|
@@ -175,10 +175,10 @@ with gr.Blocks() as demo:
|
|
175 |
return default_images, default_outputs, []
|
176 |
|
177 |
def empty_input_and_output():
|
178 |
-
return [], []
|
179 |
|
180 |
load_images_button.click(load_default_images, outputs=[input_gallery, output_gallery, example_gallery])
|
181 |
-
clear_images_button.click(empty_input_and_output, outputs=[input_gallery, output_gallery])
|
182 |
submit_button.click(
|
183 |
main_fn,
|
184 |
inputs=[
|
|
|
102 |
n_neighbors=500,
|
103 |
min_dist=0.1,
|
104 |
):
|
105 |
+
if len(images) is None:
|
106 |
return [], example_items
|
107 |
|
108 |
if perplexity >= num_sample_tsne or n_neighbors >= num_sample_tsne:
|
|
|
175 |
return default_images, default_outputs, []
|
176 |
|
177 |
def empty_input_and_output():
|
178 |
+
return [], [], example_items
|
179 |
|
180 |
load_images_button.click(load_default_images, outputs=[input_gallery, output_gallery, example_gallery])
|
181 |
+
clear_images_button.click(empty_input_and_output, outputs=[input_gallery, output_gallery, example_gallery])
|
182 |
submit_button.click(
|
183 |
main_fn,
|
184 |
inputs=[
|