Spaces:
Paused
Paused
Update gradio_tabs/animation.py
Browse files- gradio_tabs/animation.py +2 -2
gradio_tabs/animation.py
CHANGED
|
@@ -107,7 +107,7 @@ def img_postprocessing(image, w, h):
|
|
| 107 |
img_output = (edited_image[0].numpy() * 255).astype(np.uint8)
|
| 108 |
|
| 109 |
with tempfile.NamedTemporaryFile(suffix=".png", delete=False) as temp_file:
|
| 110 |
-
imageio.imwrite(temp_file.name, img_output, quality=
|
| 111 |
return temp_file.name
|
| 112 |
|
| 113 |
|
|
@@ -121,7 +121,7 @@ def vid_postprocessing(video, w, h, fps):
|
|
| 121 |
vid_np = (vid_denorm(vid[0]).numpy() * 255).astype('uint8')
|
| 122 |
|
| 123 |
with tempfile.NamedTemporaryFile(suffix=".mp4", delete=False) as temp_file:
|
| 124 |
-
imageio.mimwrite(temp_file.name, vid_np, fps=fps, codec='libx264', quality=
|
| 125 |
return temp_file.name
|
| 126 |
|
| 127 |
|
|
|
|
| 107 |
img_output = (edited_image[0].numpy() * 255).astype(np.uint8)
|
| 108 |
|
| 109 |
with tempfile.NamedTemporaryFile(suffix=".png", delete=False) as temp_file:
|
| 110 |
+
imageio.imwrite(temp_file.name, img_output, quality=8)
|
| 111 |
return temp_file.name
|
| 112 |
|
| 113 |
|
|
|
|
| 121 |
vid_np = (vid_denorm(vid[0]).numpy() * 255).astype('uint8')
|
| 122 |
|
| 123 |
with tempfile.NamedTemporaryFile(suffix=".mp4", delete=False) as temp_file:
|
| 124 |
+
imageio.mimwrite(temp_file.name, vid_np, fps=fps, codec='libx264', quality=8)
|
| 125 |
return temp_file.name
|
| 126 |
|
| 127 |
|