jke94 commited on
Commit
bbea880
1 Parent(s): e2da4b3

Update, fix for canny.

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -13,12 +13,15 @@ def launch(image_input, prompt, negative_prompt, sd_models_dropdown):
13
 
14
  def predict(image_input, prompt, negative_prompt, sd_models_dropdown):
15
 
16
- # image = np.array(image_input)
 
17
 
18
  # Get canny image
19
- image = cv2.Canny(image_input, 100, 200)
20
- image = image[:, :, None]
21
- image = np.concatenate([image, image, image], axis=2)
 
 
22
  canny_image = Image.fromarray(image)
23
 
24
  selected_model = f"""{sd_models_dropdown}"""
 
13
 
14
  def predict(image_input, prompt, negative_prompt, sd_models_dropdown):
15
 
16
+ print(type(image_input))
17
+ image = np.array(image_input)
18
 
19
  # Get canny image
20
+ t_lower = 100
21
+ t_upper = 200
22
+ image = cv2.Canny(image, t_lower, t_upper)
23
+ # image = image[:, :, None]
24
+ # image = np.concatenate([image, image, image], axis=2)
25
  canny_image = Image.fromarray(image)
26
 
27
  selected_model = f"""{sd_models_dropdown}"""