Aravind Sundaresan commited on
Commit
b5ecde4
1 Parent(s): f87c6a5

Formatted application file

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -6,7 +6,6 @@ import tensorflow_hub as hub
6
 
7
  style_transfer_model = hub.load("https://tfhub.dev/google/magenta/arbitrary-image-stylization-v1-256/2")
8
 
9
-
10
  def perform_style_transfer(content_image, style_image):
11
 
12
  content_image = tf.convert_to_tensor(content_image, np.float32)[tf.newaxis, ...] / 255.
@@ -21,7 +20,7 @@ def perform_style_transfer(content_image, style_image):
21
  content_image_input = gr.inputs.Image()
22
  style_image_input = gr.inputs.Image(shape=(256, 256))
23
 
24
- interface = gr.Interface(fn=perform_style_transfer,
25
  inputs=[content_image_input, style_image_input],
26
  outputs="image")
27
- Interface.launch()
 
6
 
7
  style_transfer_model = hub.load("https://tfhub.dev/google/magenta/arbitrary-image-stylization-v1-256/2")
8
 
 
9
  def perform_style_transfer(content_image, style_image):
10
 
11
  content_image = tf.convert_to_tensor(content_image, np.float32)[tf.newaxis, ...] / 255.
 
20
  content_image_input = gr.inputs.Image()
21
  style_image_input = gr.inputs.Image(shape=(256, 256))
22
 
23
+ app_interface = gr.Interface(fn=perform_style_transfer,
24
  inputs=[content_image_input, style_image_input],
25
  outputs="image")
26
+ app_interface.launch()