Spaces:
Running
Running
yizhangliu
commited on
Commit
•
d69f20a
1
Parent(s):
6efd69c
Update app.py
Browse files
app.py
CHANGED
@@ -315,9 +315,9 @@ def model_process_filepath(input): #image, mask):
|
|
315 |
ext = get_image_ext(origin_image_bytes)
|
316 |
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} /{ext}")
|
317 |
|
318 |
-
image = Image.
|
319 |
image.save(f'./result_image.png')
|
320 |
-
return
|
321 |
'''
|
322 |
ext = get_image_ext(origin_image_bytes)
|
323 |
|
|
|
315 |
ext = get_image_ext(origin_image_bytes)
|
316 |
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} /{ext}")
|
317 |
|
318 |
+
image = Image.open(io.BytesIO(numpy_to_bytes(res_np_img, ext)))
|
319 |
image.save(f'./result_image.png')
|
320 |
+
return image # image
|
321 |
'''
|
322 |
ext = get_image_ext(origin_image_bytes)
|
323 |
|