Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ import gradio as gr
|
|
15 |
from huggingface_hub import snapshot_download
|
16 |
|
17 |
from image_tools.sizes import resize_and_crop
|
18 |
-
from moviepy.editor import *
|
19 |
|
20 |
|
21 |
model = snapshot_download(repo_id="akhaliq/frame-interpolation-film-style")
|
@@ -87,10 +87,10 @@ def get_frames(video_in, step, name, resize_w):
|
|
87 |
|
88 |
def create_video(frames, fps, type):
|
89 |
print("building video result")
|
90 |
-
for j, img in enumerate(frames):
|
91 |
-
|
92 |
|
93 |
-
mediapy.write_video(type + "_result.
|
94 |
|
95 |
#https://zulko.github.io/moviepy/getting_started/videoclips.html#mask-clips
|
96 |
#clip = ImageSequenceClip(frames, fps=fps)
|
@@ -99,7 +99,7 @@ def create_video(frames, fps, type):
|
|
99 |
#clip.set_mask(maskclip)
|
100 |
#clip.write_videofile(type + "_result.mp4", fps=fps, codec='libx265', ffmpeg_params=['-c:v', 'libx265', '-x265-params', 'crf=25', '-pix_fmt', 'yuv420p10le', '-an'], audio=False)
|
101 |
|
102 |
-
return type + "_result.
|
103 |
|
104 |
|
105 |
def infer(url_in,interpolation,fps_output,resize_n,winsize,o_flow):
|
|
|
15 |
from huggingface_hub import snapshot_download
|
16 |
|
17 |
from image_tools.sizes import resize_and_crop
|
18 |
+
#from moviepy.editor import *
|
19 |
|
20 |
|
21 |
model = snapshot_download(repo_id="akhaliq/frame-interpolation-film-style")
|
|
|
87 |
|
88 |
def create_video(frames, fps, type):
|
89 |
print("building video result")
|
90 |
+
#for j, img in enumerate(frames):
|
91 |
+
# frames[j] = cv2.cvtColor(cv2.imread(img).astype(np.uint8), cv2.COLOR_RGB2RGBA)
|
92 |
|
93 |
+
mediapy.write_video(type + "_result.mp4", frames, fps=fps)
|
94 |
|
95 |
#https://zulko.github.io/moviepy/getting_started/videoclips.html#mask-clips
|
96 |
#clip = ImageSequenceClip(frames, fps=fps)
|
|
|
99 |
#clip.set_mask(maskclip)
|
100 |
#clip.write_videofile(type + "_result.mp4", fps=fps, codec='libx265', ffmpeg_params=['-c:v', 'libx265', '-x265-params', 'crf=25', '-pix_fmt', 'yuv420p10le', '-an'], audio=False)
|
101 |
|
102 |
+
return type + "_result.mp4"
|
103 |
|
104 |
|
105 |
def infer(url_in,interpolation,fps_output,resize_n,winsize,o_flow):
|