Spaces:
Runtime error
Runtime error
dtrejopizzo
commited on
Commit
•
d37784a
1
Parent(s):
e9af438
Update app.py
Browse files
app.py
CHANGED
@@ -11,11 +11,11 @@ stylepro_artistic = hub.Module(name="stylepro_artistic")
|
|
11 |
def inference(content,style):
|
12 |
result = stylepro_artistic.style_transfer(
|
13 |
images=[{
|
14 |
-
'
|
15 |
-
'
|
16 |
}])
|
17 |
return Image.fromarray(np.uint8(result[0]['data'])[:,:,::-1]).convert('RGB')
|
18 |
-
|
19 |
title = " Transferencia de estilos"
|
20 |
description = "Demo para probar la transferencia de estilos de una imagen a otra."
|
21 |
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2003.07694'target='_blank'>Parameter-Free Style Projection for Arbitrary Style Transfer</a> | <a href='https://github.com/PaddlePaddle/PaddleHub' target='_blank'>Github Repo</a></p>"
|
|
|
11 |
def inference(content,style):
|
12 |
result = stylepro_artistic.style_transfer(
|
13 |
images=[{
|
14 |
+
'content': cv2.imread(content.name),
|
15 |
+
'styles': [cv2.imread(style.name)]
|
16 |
}])
|
17 |
return Image.fromarray(np.uint8(result[0]['data'])[:,:,::-1]).convert('RGB')
|
18 |
+
|
19 |
title = " Transferencia de estilos"
|
20 |
description = "Demo para probar la transferencia de estilos de una imagen a otra."
|
21 |
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2003.07694'target='_blank'>Parameter-Free Style Projection for Arbitrary Style Transfer</a> | <a href='https://github.com/PaddlePaddle/PaddleHub' target='_blank'>Github Repo</a></p>"
|