luca-martial commited on
Commit
dc39883
·
1 Parent(s): 47f65bd
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -4,7 +4,9 @@ import tensorflow_hub as hub
4
 
5
  hub_model = hub.load('https://tfhub.dev/google/magenta/arbitrary-image-stylization-v1-256/2')
6
 
7
- def stylize(content_image, style_image):
 
 
8
  stylized_image = hub_model(tf.constant(content_image), tf.constant(style_image))[0]
9
  return tensor_to_image(stylized_image)
10
 
 
4
 
5
  hub_model = hub.load('https://tfhub.dev/google/magenta/arbitrary-image-stylization-v1-256/2')
6
 
7
+ def stylize(content_path, style_path):
8
+ content_image = load_img(content_path)
9
+ style_image = load_img(style_path)
10
  stylized_image = hub_model(tf.constant(content_image), tf.constant(style_image))[0]
11
  return tensor_to_image(stylized_image)
12