Spaces:
Build error
Build error
Commit ·
779520c
1
Parent(s): 44a513c
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,10 +19,11 @@ def do_style_transfer(content_image, style_image):
|
|
| 19 |
return Image.fromarray(np.uint8(stylized_image[0] * 255))
|
| 20 |
|
| 21 |
|
| 22 |
-
content_image_input = gr.inputs.Image(label="
|
| 23 |
-
style_image_input = gr.inputs.Image(shape=(256, 256), label="
|
| 24 |
|
| 25 |
-
# Add image examples for users
|
|
|
|
| 26 |
golden_gate = ["example_deadpool2.jpeg", "style_the_great_wave.jpeg"]
|
| 27 |
joshua_tree = ["example_deadpool.png", "style_starry_night.jpeg"]
|
| 28 |
avatar = ["example_avatar.jpeg", "style_the_scream.jpg"]
|
|
@@ -33,7 +34,7 @@ paris = ["example_paris.jpeg", "style_vangogh.jpeg"]
|
|
| 33 |
|
| 34 |
# Customize interface
|
| 35 |
title = "Transferencia de estilo usando TF-Hub"
|
| 36 |
-
description = "<p style='text-align: center'> Demo sobre transferencia de estilo usando un modelo de transferecia prenetrenado de Image Stylization extraido de TensorFlow Hub.
|
| 37 |
article = r"""<b>:: Referencias ::</b>
|
| 38 |
<br>
|
| 39 |
<a href='https://www.tensorflow.org/hub/tutorials/tf2_arbitrary_image_stylization' target='_blank'>
|
|
@@ -55,7 +56,7 @@ app_interface = gr.Interface(fn=do_style_transfer,
|
|
| 55 |
outputs="image",
|
| 56 |
title=title,
|
| 57 |
description=description,
|
| 58 |
-
examples=[golden_gate,joshua_tree,avatar,joker,einstein,monalisa,paris],
|
| 59 |
article=article
|
| 60 |
)
|
| 61 |
app_interface.launch()
|
|
|
|
| 19 |
return Image.fromarray(np.uint8(stylized_image[0] * 255))
|
| 20 |
|
| 21 |
|
| 22 |
+
content_image_input = gr.inputs.Image(label="Contenido")
|
| 23 |
+
style_image_input = gr.inputs.Image(shape=(256, 256), label="Estilo")
|
| 24 |
|
| 25 |
+
# Add image examples for users
|
| 26 |
+
maradona = ["maradona.jpeg","style_the_great_wave.jpeg"]
|
| 27 |
golden_gate = ["example_deadpool2.jpeg", "style_the_great_wave.jpeg"]
|
| 28 |
joshua_tree = ["example_deadpool.png", "style_starry_night.jpeg"]
|
| 29 |
avatar = ["example_avatar.jpeg", "style_the_scream.jpg"]
|
|
|
|
| 34 |
|
| 35 |
# Customize interface
|
| 36 |
title = "Transferencia de estilo usando TF-Hub"
|
| 37 |
+
description = "<p style='text-align: center'> Demo sobre transferencia de estilo usando un modelo de transferecia prenetrenado de Image Stylization extraido de TensorFlow Hub.</p>"
|
| 38 |
article = r"""<b>:: Referencias ::</b>
|
| 39 |
<br>
|
| 40 |
<a href='https://www.tensorflow.org/hub/tutorials/tf2_arbitrary_image_stylization' target='_blank'>
|
|
|
|
| 56 |
outputs="image",
|
| 57 |
title=title,
|
| 58 |
description=description,
|
| 59 |
+
examples=[maradona,golden_gate,joshua_tree,avatar,joker,einstein,monalisa,paris],
|
| 60 |
article=article
|
| 61 |
)
|
| 62 |
app_interface.launch()
|