linoyts HF Staff commited on
Commit
3a70c4e
·
verified ·
1 Parent(s): bd03e61

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -244,9 +244,10 @@ def infer(
244
  if not all_inputs:
245
  raise gr.Error("Please upload at least one image or a background image.")
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,
 
244
  if not all_inputs:
245
  raise gr.Error("Please upload at least one image or a background image.")
246
 
247
+ prompt = prompt +". Integrate the product from Image 1 onto Image 2 as the background, ensuring seamless blending with appropriate lighting and shadows" if len(all_inputs) > 1 else prompt
248
  result = pipe(
249
  image=all_inputs,
250
+ prompt=prompt,
251
  width=width,
252
  height=height,
253
  num_inference_steps=num_inference_steps,