lunalade commited on
Commit
51c8486
·
verified ·
1 Parent(s): aeb62ee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -11,8 +11,8 @@ edges2ferrets = './edges2ferrets_model.h5'
11
  ferretMaker = tf.keras.models.load_model(edges2ferrets)
12
 
13
  def transform_image(img, input_type):
14
- sigma = 1.0 # Placeholder value for sigma
15
- if input_type == "photo":
16
  # Resize the input photo to 256x256
17
  img = cv2.resize(img, (256, 256))
18
 
@@ -23,7 +23,7 @@ def transform_image(img, input_type):
23
  edges = (feature.canny(grey_img, sigma=sigma) * 255).astype(np.uint8)
24
  processed_input = cv2.cvtColor(edges, cv2.COLOR_GRAY2RGB)
25
 
26
- elif input_type == "drawing":
27
  # Resize the input drawing to 256x256
28
  img = cv2.resize(img, (256, 256))
29
 
 
11
  ferretMaker = tf.keras.models.load_model(edges2ferrets)
12
 
13
  def transform_image(img, input_type):
14
+ sigma = 1.7 # Placeholder value for sigma
15
+ if input_type == "Photo":
16
  # Resize the input photo to 256x256
17
  img = cv2.resize(img, (256, 256))
18
 
 
23
  edges = (feature.canny(grey_img, sigma=sigma) * 255).astype(np.uint8)
24
  processed_input = cv2.cvtColor(edges, cv2.COLOR_GRAY2RGB)
25
 
26
+ elif input_type == "Drawing":
27
  # Resize the input drawing to 256x256
28
  img = cv2.resize(img, (256, 256))
29