jcjurado commited on
Commit
8e8759b
1 Parent(s): 0149465

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -20,10 +20,18 @@ def perform_style_transfer(content_image, style_image):
20
  content_image_input = gr.inputs.Image(label="Content Image")
21
  style_image_input = gr.inputs.Image(shape=(256, 256), label="Style Image")
22
 
 
 
 
 
23
 
24
  app_interface = gr.Interface(fn=perform_style_transfer,
25
  inputs=[content_image_input, style_image_input],
26
  outputs="image",
27
  title="Fast Neural Style Transfer",
28
- description="Gradio demo for Fast Neural Style Transfer using a pretrained Image Stylization model from TensorFlow Hub. To use it, simply upload a content image and style image, or click one of the examples to load them. To learn more about the project, please find the references listed below.")
 
 
 
 
29
  app_interface.launch()
 
20
  content_image_input = gr.inputs.Image(label="Content Image")
21
  style_image_input = gr.inputs.Image(shape=(256, 256), label="Style Image")
22
 
23
+ # Examples
24
+ golden_gate = ["golden_gate_bridge.jpeg", "the_great_wave.jpeg"]
25
+ joshua_tree = ["joshua_tree.jpeg", "starry_night.jpeg"]
26
+ glacier = ["glacier_national_park.jpeg", "the_scream.jpg"]
27
 
28
  app_interface = gr.Interface(fn=perform_style_transfer,
29
  inputs=[content_image_input, style_image_input],
30
  outputs="image",
31
  title="Fast Neural Style Transfer",
32
+ description="Gradio demo for Fast Neural Style Transfer using a pretrained Image Stylization model from TensorFlow Hub. To use it, simply upload a content image and style image, or click one of the examples to load them. To learn more about the project, please find the references listed below.",
33
+ examples=[glacier, golden_gate, joshua_tree],
34
+ article="**References**\n\n"
35
+ "<a href='https://www.tensorflow.org/hub/tutorials/tf2_arbitrary_image_stylization' target='_blank'>1. Tutorial to implement Fast Neural Style Transfer using the pretrained model from TensorFlow Hub</a> \n"
36
+ "<a href='https://huggingface.co/spaces/luca-martial/neural-style-transfer' target='_blank'>2. The idea to build a neural style transfer application was inspired from this Hugging Face Space </a>")
37
  app_interface.launch()