ahmedbrs commited on
Commit
66df1ac
1 Parent(s): 39d3b58

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -133,7 +133,7 @@ def run(sketch, caption, threshold, seed):
133
  hsv_image[..., 2][mask] = 0 # Value set to 0, making it black
134
 
135
  mask_tensor_org = sketch2[:,:,0]/255
136
- hsv_image[mask_tensor_org==1] = [0,0,1]
137
 
138
  # Convert the HSV image back to RGB to display and save
139
  rgb_image = hsv_to_rgb(hsv_image)
 
133
  hsv_image[..., 2][mask] = 0 # Value set to 0, making it black
134
 
135
  mask_tensor_org = sketch2[:,:,0]/255
136
+ hsv_image[mask_tensor_org>=0.5] = [0,0,1]
137
 
138
  # Convert the HSV image back to RGB to display and save
139
  rgb_image = hsv_to_rgb(hsv_image)