yizhangliu commited on
Commit
aa43f64
·
1 Parent(s): 03464bd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -218,7 +218,7 @@ def model_process(input):
218
  print(f"process time_2_: {(time.time() - start) * 1000}ms, {alpha_channel.shape}, {res_np_img.shape} / {res_np_img[250][250]} / {res_np_img.dtype}")
219
  image = Image.fromarray(res_np_img.astype(np.uint8))
220
  image.save(f'./result_image.png')
221
- return res_np_img.astype(np.uint8) # image
222
 
223
  '''
224
  ext = get_image_ext(origin_image_bytes)
@@ -480,7 +480,7 @@ with image_blocks as demo:
480
 
481
 
482
  # btn.click(fn=predict, inputs=[image, prompt], outputs=[image_out, community_icon, loading_icon, share_button])
483
- btn.click(fn=predict, inputs=[image], outputs=[image]) #, community_icon, loading_icon, share_button])
484
  #share_button.click(None, [], [], _js=share_js)
485
 
486
 
 
218
  print(f"process time_2_: {(time.time() - start) * 1000}ms, {alpha_channel.shape}, {res_np_img.shape} / {res_np_img[250][250]} / {res_np_img.dtype}")
219
  image = Image.fromarray(res_np_img.astype(np.uint8))
220
  image.save(f'./result_image.png')
221
+ return image_pil # res_np_img.astype(np.uint8) # image
222
 
223
  '''
224
  ext = get_image_ext(origin_image_bytes)
 
480
 
481
 
482
  # btn.click(fn=predict, inputs=[image, prompt], outputs=[image_out, community_icon, loading_icon, share_button])
483
+ btn.click(fn=predict, inputs=[image], outputs=[image_out]) #, community_icon, loading_icon, share_button])
484
  #share_button.click(None, [], [], _js=share_js)
485
 
486