liuyizhang
commited on
Commit
•
1d757ee
1
Parent(s):
6e3e561
update app.py
Browse files
app.py
CHANGED
@@ -510,6 +510,7 @@ def run_anything_task(input_image, text_prompt, task_type, inpaint_prompt, box_t
|
|
510 |
size = image_pil.size
|
511 |
|
512 |
output_images = []
|
|
|
513 |
# run grounding dino model
|
514 |
if (task_type == 'inpainting' or task_type == 'remove') and mask_source_radio == mask_source_draw:
|
515 |
pass
|
@@ -729,7 +730,7 @@ if __name__ == "__main__":
|
|
729 |
|
730 |
with gr.Column():
|
731 |
gallery = gr.Gallery(label="result images", show_label=True, elem_id="gallery"
|
732 |
-
).style(preview=True,
|
733 |
|
734 |
run_button.click(fn=run_anything_task, inputs=[
|
735 |
input_image, text_prompt, task_type, inpaint_prompt, box_threshold, text_threshold, iou_threshold, inpaint_mode, mask_source_radio, remove_mode, remove_mask_extend, num_relation], outputs=[gallery, gallery], show_progress=True, queue=True)
|
|
|
510 |
size = image_pil.size
|
511 |
|
512 |
output_images = []
|
513 |
+
# output_images.append(input_image['image'])
|
514 |
# run grounding dino model
|
515 |
if (task_type == 'inpainting' or task_type == 'remove') and mask_source_radio == mask_source_draw:
|
516 |
pass
|
|
|
730 |
|
731 |
with gr.Column():
|
732 |
gallery = gr.Gallery(label="result images", show_label=True, elem_id="gallery"
|
733 |
+
).style(preview=True, grid=2, object_fit="scale-down")
|
734 |
|
735 |
run_button.click(fn=run_anything_task, inputs=[
|
736 |
input_image, text_prompt, task_type, inpaint_prompt, box_threshold, text_threshold, iou_threshold, inpaint_mode, mask_source_radio, remove_mode, remove_mask_extend, num_relation], outputs=[gallery, gallery], show_progress=True, queue=True)
|