luca-martial commited on
Commit
1f79383
1 Parent(s): 5342120

add examples

Browse files
Files changed (1) hide show
  1. app.py +12 -1
app.py CHANGED
@@ -20,6 +20,17 @@ def stylize(content_image, style_image):
20
  style_image = style_image.astype(np.float32)[np.newaxis, ...] / 255.
21
  stylized_image = hub_model(tf.constant(content_image), tf.constant(style_image))[0]
22
  return tensor_to_image(stylized_image)
 
 
 
 
23
 
24
- iface = gr.Interface(fn=stylize, inputs=["image", "image"], outputs="image")
 
 
 
 
 
 
 
25
  iface.launch()
 
20
  style_image = style_image.astype(np.float32)[np.newaxis, ...] / 255.
21
  stylized_image = hub_model(tf.constant(content_image), tf.constant(style_image))[0]
22
  return tensor_to_image(stylized_image)
23
+
24
+ examples =[["Paris.jpeg"], ["Aristotle.jpeg"], ["Dali.jpeg"], ["Van Gogh.jpeg"]]
25
+ title = "Fast Neural Style Transfer using TF-Hub"
26
+ description = "Demo for neural style transfer using the pretrained Arbitrary Image Stylization model from TensorFlow Hub."
27
 
28
+
29
+ iface = gr.Interface(fn=stylize,
30
+ inputs=["image", "image"],
31
+ outputs="image",
32
+ title=title,
33
+ description=description,
34
+ article=article,
35
+ examples=examples)
36
  iface.launch()