Spaces:
Runtime error
Runtime error
Commit
·
dc39883
1
Parent(s):
47f65bd
debug
Browse files
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(
|
|
|
|
|
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 |
|