eternalGenius commited on
Commit
1bf3ef4
·
verified ·
1 Parent(s): d8ed05e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -701,7 +701,7 @@ def step5_generate_card_and_prompt(
701
  product_rgba = cutout_product(stored_image)
702
 
703
  max_img_w = int(card_w * 0.6)
704
- max_img_h = int(card_h * 0.42)
705
  w, h = product_rgba.size
706
  scale = min(max_img_w / w, max_img_h / h)
707
  new_w = int(w * scale)
@@ -712,7 +712,7 @@ def step5_generate_card_and_prompt(
712
  img_y = int(card_h * 0.17)
713
  card.alpha_composite(product_resized, (img_x, img_y))
714
 
715
- text_block_h = int(card_h * 0.3)
716
  text_block_y = card_h - text_block_h - 40
717
  overlay = Image.new("RGBA", (card_w - 80, text_block_h), (255, 255, 255, 235))
718
  card.alpha_composite(overlay, (40, text_block_y))
 
701
  product_rgba = cutout_product(stored_image)
702
 
703
  max_img_w = int(card_w * 0.6)
704
+ max_img_h = int(card_h * 0.5)
705
  w, h = product_rgba.size
706
  scale = min(max_img_w / w, max_img_h / h)
707
  new_w = int(w * scale)
 
712
  img_y = int(card_h * 0.17)
713
  card.alpha_composite(product_resized, (img_x, img_y))
714
 
715
+ text_block_h = int(card_h * 0.4)
716
  text_block_y = card_h - text_block_h - 40
717
  overlay = Image.new("RGBA", (card_w - 80, text_block_h), (255, 255, 255, 235))
718
  card.alpha_composite(overlay, (40, text_block_y))