gaur3009 commited on
Commit
d3b1e9c
·
verified ·
1 Parent(s): 2179a1d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -50,7 +50,7 @@ def apply_displacement_map(text_img, clothing_img, strength=20):
50
 
51
  def overlay_text_on_clothing(clothing_image, text_input, style, strength=20, alpha=0.7):
52
  """Blend generated text onto the clothing image."""
53
- clothing_img = cv2.imdecode(np.frombuffer(clothing_image, np.uint8), cv2.IMREAD_COLOR)
54
 
55
  # Generate text image dynamically
56
  text_img_pil = generate_text_image(text_input, style, clothing_img.shape[1], clothing_img.shape[0])
 
50
 
51
  def overlay_text_on_clothing(clothing_image, text_input, style, strength=20, alpha=0.7):
52
  """Blend generated text onto the clothing image."""
53
+ clothing_img = cv2.imread(clothing_image) # Read image from file path
54
 
55
  # Generate text image dynamically
56
  text_img_pil = generate_text_image(text_input, style, clothing_img.shape[1], clothing_img.shape[0])