luca-martial commited on
Commit
f1b9169
1 Parent(s): 886ff36
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -34,12 +34,15 @@ def load_img(path_to_img):
34
 
35
  def stylize(content_image, style_image):
36
  content_image = content_image.astype(np.float32) / 255.
37
-
 
 
 
38
 
39
  #content_image = load_img(content_path)
40
  #style_image = load_img(style_path)
41
  #stylized_image = hub_model(tf.constant(content_image), tf.constant(style_image))[0]
42
- return content_image
43
 
44
  #content_image = plt.imread(content_image_path)
45
  #style_image = plt.imread(style_image_path)
 
34
 
35
  def stylize(content_image, style_image):
36
  content_image = content_image.astype(np.float32) / 255.
37
+ style_image = style_image.astype(np.float32) / 255.
38
+
39
+
40
+ style_image = tf.image.resize(style_image, (256, 256))
41
 
42
  #content_image = load_img(content_path)
43
  #style_image = load_img(style_path)
44
  #stylized_image = hub_model(tf.constant(content_image), tf.constant(style_image))[0]
45
+ return style_image
46
 
47
  #content_image = plt.imread(content_image_path)
48
  #style_image = plt.imread(style_image_path)