Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -1120,7 +1120,22 @@ if __name__ == "__main__":
|
|
1120 |
examples_instance.load_from_cache = MethodType(custom_load_from_cache, examples_instance)
|
1121 |
|
1122 |
apply_custom_load_from_cache(examples)
|
1123 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1124 |
|
1125 |
|
1126 |
demo.launch()
|
|
|
1120 |
examples_instance.load_from_cache = MethodType(custom_load_from_cache, examples_instance)
|
1121 |
|
1122 |
apply_custom_load_from_cache(examples)
|
1123 |
+
|
1124 |
+
# Connect the event handler for file upload changes
|
1125 |
+
gallery.change(
|
1126 |
+
fn=update_gallery_state,
|
1127 |
+
inputs=[gallery, images_state],
|
1128 |
+
outputs=[images_state, gallery, preview_gallery],
|
1129 |
+
show_progress="full"
|
1130 |
+
).then(
|
1131 |
+
fn=update_height_width,
|
1132 |
+
inputs=[images_state],
|
1133 |
+
outputs=[height, width]
|
1134 |
+
).then(
|
1135 |
+
fn=update_denoise_checkboxes,
|
1136 |
+
inputs=[images_state, task_type, azimuth, elevation, distance],
|
1137 |
+
outputs=[denoise_mask_checkbox]
|
1138 |
+
)
|
1139 |
|
1140 |
|
1141 |
demo.launch()
|