jamino30 commited on
Commit
493509d
1 Parent(s): 7e478b8

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +9 -6
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='image',
 
 
 
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)