Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -246,7 +246,7 @@ def infer(
|
|
| 246 |
|
| 247 |
result = pipe(
|
| 248 |
image=all_inputs,
|
| 249 |
-
prompt=prompt+". Integrate the product from Image 1 onto
|
| 250 |
width=width,
|
| 251 |
height=height,
|
| 252 |
num_inference_steps=num_inference_steps,
|
|
@@ -274,7 +274,7 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=css) as demo:
|
|
| 274 |
label="Product image (background auto removed)", type="pil"
|
| 275 |
)
|
| 276 |
image_background = gr.Image(label="Background Image", type="pil", visible=True)
|
| 277 |
-
prompt = gr.Textbox(label="Prompt")
|
| 278 |
run_button = gr.Button("Fuse Images", variant="primary")
|
| 279 |
|
| 280 |
with gr.Accordion("Advanced Settings", open=False):
|
|
@@ -292,7 +292,7 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=css) as demo:
|
|
| 292 |
[None, "fusion_car.png", ""],
|
| 293 |
["product_2.png", "background_2.png", "put the product on the chair"],
|
| 294 |
[None, "fusion_shoes.png", "put the shoes on the feet"],
|
| 295 |
-
["product_3.png", "background_3.jpg", "
|
| 296 |
],
|
| 297 |
inputs=[product_image, image_background, prompt],
|
| 298 |
outputs=[result, seed],
|
|
|
|
| 246 |
|
| 247 |
result = pipe(
|
| 248 |
image=all_inputs,
|
| 249 |
+
prompt=prompt+". Integrate the product from Image 1 onto Image 2 as the background, ensuring seamless blending with appropriate lighting and shadows",
|
| 250 |
width=width,
|
| 251 |
height=height,
|
| 252 |
num_inference_steps=num_inference_steps,
|
|
|
|
| 274 |
label="Product image (background auto removed)", type="pil"
|
| 275 |
)
|
| 276 |
image_background = gr.Image(label="Background Image", type="pil", visible=True)
|
| 277 |
+
prompt = gr.Textbox(label="Prompt", placeholder="put the [product] on the [background]")
|
| 278 |
run_button = gr.Button("Fuse Images", variant="primary")
|
| 279 |
|
| 280 |
with gr.Accordion("Advanced Settings", open=False):
|
|
|
|
| 292 |
[None, "fusion_car.png", ""],
|
| 293 |
["product_2.png", "background_2.png", "put the product on the chair"],
|
| 294 |
[None, "fusion_shoes.png", "put the shoes on the feet"],
|
| 295 |
+
["product_3.png", "background_3.jpg", "put the product on the background"],
|
| 296 |
],
|
| 297 |
inputs=[product_image, image_background, prompt],
|
| 298 |
outputs=[result, seed],
|