Spaces:
Running
Running
yizhangliu
commited on
Commit
·
6f4d6ef
1
Parent(s):
811f999
Update app.py
Browse files
app.py
CHANGED
@@ -215,7 +215,7 @@ def model_process(input):
|
|
215 |
(res_np_img, alpha_channel[:, :, np.newaxis]), axis=-1
|
216 |
)
|
217 |
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}")
|
218 |
-
image = Image.fromarray(res_np_img)
|
219 |
image.save(f'./result_image.png')
|
220 |
return image
|
221 |
|
|
|
215 |
(res_np_img, alpha_channel[:, :, np.newaxis]), axis=-1
|
216 |
)
|
217 |
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}")
|
218 |
+
image = Image.fromarray(res_np_img.astype(np.uint8))
|
219 |
image.save(f'./result_image.png')
|
220 |
return image
|
221 |
|