Spaces:
Running
on
Zero
Running
on
Zero
update ui
Browse files
app.py
CHANGED
|
@@ -3156,9 +3156,9 @@ with demo:
|
|
| 3156 |
Clear All Points
|
| 3157 |
</h5>
|
| 3158 |
""")
|
| 3159 |
-
prompt_image1 = ImagePrompter(show_label=False, elem_id="
|
| 3160 |
-
prompt_image2 = ImagePrompter(show_label=False, elem_id="
|
| 3161 |
-
prompt_image3 = ImagePrompter(show_label=False, elem_id="
|
| 3162 |
# def update_number_of_images(images):
|
| 3163 |
# if images is None:
|
| 3164 |
# return gr.update(max=0, value=0)
|
|
@@ -3177,8 +3177,9 @@ with demo:
|
|
| 3177 |
return
|
| 3178 |
if index >= total_len:
|
| 3179 |
index = total_len - 1
|
| 3180 |
-
|
| 3181 |
-
return
|
|
|
|
| 3182 |
load_one_image_button.click(update_prompt_image, inputs=[input_gallery, output_gallery, image_type_radio, image1_slider], outputs=[prompt_image1])
|
| 3183 |
load_one_image_button.click(update_prompt_image, inputs=[input_gallery, output_gallery, image_type_radio, image2_slider], outputs=[prompt_image2])
|
| 3184 |
load_one_image_button.click(update_prompt_image, inputs=[input_gallery, output_gallery, image_type_radio, image3_slider], outputs=[prompt_image3])
|
|
|
|
| 3156 |
Clear All Points
|
| 3157 |
</h5>
|
| 3158 |
""")
|
| 3159 |
+
prompt_image1 = ImagePrompter(show_label=False, elem_id="prompt_image1", interactive=False)
|
| 3160 |
+
prompt_image2 = ImagePrompter(show_label=False, elem_id="prompt_image2", interactive=False)
|
| 3161 |
+
prompt_image3 = ImagePrompter(show_label=False, elem_id="prompt_image3", interactive=False)
|
| 3162 |
# def update_number_of_images(images):
|
| 3163 |
# if images is None:
|
| 3164 |
# return gr.update(max=0, value=0)
|
|
|
|
| 3177 |
return
|
| 3178 |
if index >= total_len:
|
| 3179 |
index = total_len - 1
|
| 3180 |
+
|
| 3181 |
+
return ImagePrompter(value={'image': images[index][0], 'points': []}, interactive=True)
|
| 3182 |
+
# return gr.Image(value=images[index][0], elem_id=f"prompt_image{randint}", interactive=True)
|
| 3183 |
load_one_image_button.click(update_prompt_image, inputs=[input_gallery, output_gallery, image_type_radio, image1_slider], outputs=[prompt_image1])
|
| 3184 |
load_one_image_button.click(update_prompt_image, inputs=[input_gallery, output_gallery, image_type_radio, image2_slider], outputs=[prompt_image2])
|
| 3185 |
load_one_image_button.click(update_prompt_image, inputs=[input_gallery, output_gallery, image_type_radio, image3_slider], outputs=[prompt_image3])
|