model2 commited on
Commit
6231739
·
1 Parent(s): cb926bd

image sizing

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -264,7 +264,7 @@ def advance_blur(input_image):
264
 
265
  img = Image.fromarray(
266
  np.clip(
267
- 255.0 * get_value_at_index(final_image, 0).cpu().numpy(), 0, 255
268
  ).astype(np.uint8)
269
  )
270
  outpath = f"output/{image_file_name}-advance-blurred.jpg"
@@ -302,9 +302,7 @@ if __name__ == "__main__":
302
 
303
  # When clicking the button, it will trigger the `generate_image` function, with the respective inputs
304
  # and the output an image
305
- generate_btn.click(
306
- fn=advance_blur, inputs=[input_image], outputs=[input_image]
307
- )
308
  app.launch(share=True)
309
 
310
  gr.Markdown('#### Have you even said "Thank you"?')
 
264
 
265
  img = Image.fromarray(
266
  np.clip(
267
+ (255.0 * get_value_at_index(final_image, 0)[0].cpu().numpy()), 0, 255
268
  ).astype(np.uint8)
269
  )
270
  outpath = f"output/{image_file_name}-advance-blurred.jpg"
 
302
 
303
  # When clicking the button, it will trigger the `generate_image` function, with the respective inputs
304
  # and the output an image
305
+ generate_btn.click(fn=advance_blur, inputs=[input_image], outputs=[input_image])
 
 
306
  app.launch(share=True)
307
 
308
  gr.Markdown('#### Have you even said "Thank you"?')