jamino30 commited on
Commit
396f6f7
1 Parent(s): 88b9835

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -86,7 +86,8 @@ style_options = {k: f'./style_images/{v}' for k, v in style_options.items()}
86
 
87
  @spaces.GPU
88
  def inference(content_image, style_image):
89
- print('STYLE STYLE', style_image)
 
90
  img_size = 512
91
  content_img, original_size = load_img(content_image, img_size)
92
  content_img = content_img.to(device)
@@ -132,11 +133,11 @@ def inference(content_image, style_image):
132
 
133
  if iter % 15 == 0:
134
  saved_image = save_img(generated_img, original_size)
135
- yield (content_image, saved_image), str(round(iter/iters*100))+'%'
136
 
137
  et = time.time()
138
  print('TIME TAKEN:', et-st)
139
- yield (content_image, save_img(generated_img, original_size)), str(round(iter/iters*100))+'%'
140
 
141
  css = """
142
  #style, #progress-label { height: 100px }
 
86
 
87
  @spaces.GPU
88
  def inference(content_image, style_image):
89
+ print('-'*15)
90
+ print('STYLE:', style_image)
91
  img_size = 512
92
  content_img, original_size = load_img(content_image, img_size)
93
  content_img = content_img.to(device)
 
133
 
134
  if iter % 15 == 0:
135
  saved_image = save_img(generated_img, original_size)
136
+ yield (content_image, saved_image), f'{str(round(iter/iters*100))}% | {(time.time()-st):.2f}s'
137
 
138
  et = time.time()
139
  print('TIME TAKEN:', et-st)
140
+ yield (content_image, save_img(generated_img, original_size)), f'{str(round(iter/iters*100))}% | {(et-st):.2f}s'
141
 
142
  css = """
143
  #style, #progress-label { height: 100px }