Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
@@ -114,16 +114,19 @@ def transfer_style(content_image):
|
|
114 |
total_loss.backward()
|
115 |
optimizer.step()
|
116 |
|
117 |
-
yield save_img(generated_img, original_size)
|
118 |
|
119 |
-
yield save_img(generated_img, original_size)
|
120 |
|
121 |
|
122 |
interface = gr.Interface(
|
123 |
fn=transfer_style,
|
124 |
-
inputs=[gr.Image(type='pil')],
|
125 |
-
outputs=
|
|
|
|
|
|
|
126 |
title="Starry Night Style Transfer",
|
127 |
api_name='style',
|
128 |
-
allow_flagging='never'
|
129 |
-
).launch()
|
|
|
114 |
total_loss.backward()
|
115 |
optimizer.step()
|
116 |
|
117 |
+
yield save_img(generated_img, original_size), str(round(iter/iters*100))+'%'
|
118 |
|
119 |
+
yield save_img(generated_img, original_size), str(round(iter/iters*100))+'%'
|
120 |
|
121 |
|
122 |
interface = gr.Interface(
|
123 |
fn=transfer_style,
|
124 |
+
inputs=[gr.Image(label='Content', type='pil')],
|
125 |
+
outputs=[
|
126 |
+
gr.Image(label='Output', show_download_button=True),
|
127 |
+
gr.Label(label='Progress')
|
128 |
+
],
|
129 |
title="Starry Night Style Transfer",
|
130 |
api_name='style',
|
131 |
+
allow_flagging='never',
|
132 |
+
).launch(inbrowser=True)
|