Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -348,7 +348,7 @@ def run_local(base_image, base_mask, reference_image, ref_mask, seed, base_mask_
|
|
348 |
edited_image = Image.fromarray(edited_image)
|
349 |
|
350 |
|
351 |
-
return image_to_base64(edited_image)
|
352 |
|
353 |
def update_ui(option):
|
354 |
if option == "Draw Mask":
|
@@ -391,6 +391,7 @@ with gr.Blocks() as demo:
|
|
391 |
|
392 |
with gr.Column(scale=1):
|
393 |
baseline_gallery = gr.Gallery(label='Output', show_label=True, elem_id="gallery", height=695, columns=1)
|
|
|
394 |
with gr.Accordion("Advanced Option", open=True):
|
395 |
seed = gr.Slider(label="Seed", minimum=-1, maximum=999999999, step=1, value=666)
|
396 |
gr.Markdown("### Guidelines")
|
@@ -422,6 +423,6 @@ with gr.Blocks() as demo:
|
|
422 |
|
423 |
run_local_button.click(fn=run_local,
|
424 |
inputs=[base_image, base_mask, ref_image, ref_mask, seed, base_mask_option, ref_mask_option, text_prompt],
|
425 |
-
outputs=[baseline_gallery]
|
426 |
)
|
427 |
demo.launch()
|
|
|
348 |
edited_image = Image.fromarray(edited_image)
|
349 |
|
350 |
|
351 |
+
return [edited_image,image_to_base64(edited_image)]
|
352 |
|
353 |
def update_ui(option):
|
354 |
if option == "Draw Mask":
|
|
|
391 |
|
392 |
with gr.Column(scale=1):
|
393 |
baseline_gallery = gr.Gallery(label='Output', show_label=True, elem_id="gallery", height=695, columns=1)
|
394 |
+
base64_box = gr.Textbox(label="Base64 Output", visible=False)
|
395 |
with gr.Accordion("Advanced Option", open=True):
|
396 |
seed = gr.Slider(label="Seed", minimum=-1, maximum=999999999, step=1, value=666)
|
397 |
gr.Markdown("### Guidelines")
|
|
|
423 |
|
424 |
run_local_button.click(fn=run_local,
|
425 |
inputs=[base_image, base_mask, ref_image, ref_mask, seed, base_mask_option, ref_mask_option, text_prompt],
|
426 |
+
outputs=[baseline_gallery, base64_box]
|
427 |
)
|
428 |
demo.launch()
|