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

image sizing

Browse files
Files changed (1) hide show
  1. app.py +13 -13
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"
@@ -291,20 +291,20 @@ if __name__ == "__main__":
291
  " the production of this application._"
292
  )
293
 
294
- with gr.Row():
295
- with gr.Column():
296
- input_image = gr.Image(label="Input Image", type="filepath")
297
- generate_btn = gr.Button("Submit")
298
 
299
- with gr.Column():
300
- # The output image
301
- output_image = gr.Image(label="Generated Image")
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=[output_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).cpu().numpy(), 0, 255
268
  ).astype(np.uint8)
269
  )
270
  outpath = f"output/{image_file_name}-advance-blurred.jpg"
 
291
  " the production of this application._"
292
  )
293
 
294
+ # with gr.Row():
295
+ # with gr.Column():
296
+ input_image = gr.Image(label="Input Image", type="filepath")
297
+ generate_btn = gr.Button("Submit")
298
 
299
+ # with gr.Column():
300
+ # # The output image
301
+ # output_image = gr.Image(label="Generated Image")
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"?')