Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -31,7 +31,7 @@ from datetime import datetime, timedelta
|
|
31 |
|
32 |
from diffusers.image_processor import VaeImageProcessor
|
33 |
from openai import OpenAI
|
34 |
-
import moviepy
|
35 |
import utils
|
36 |
from rife_model import load_rife_model, rife_inference_with_latents
|
37 |
from huggingface_hub import hf_hub_download, snapshot_download
|
@@ -282,8 +282,8 @@ def infer(
|
|
282 |
|
283 |
def convert_to_gif(video_path):
|
284 |
clip = mp.VideoFileClip(video_path)
|
285 |
-
clip = clip.
|
286 |
-
clip = clip.
|
287 |
gif_path = video_path.replace(".mp4", ".gif")
|
288 |
clip.write_gif(gif_path, fps=8)
|
289 |
return gif_path
|
|
|
31 |
|
32 |
from diffusers.image_processor import VaeImageProcessor
|
33 |
from openai import OpenAI
|
34 |
+
import moviepy as mp
|
35 |
import utils
|
36 |
from rife_model import load_rife_model, rife_inference_with_latents
|
37 |
from huggingface_hub import hf_hub_download, snapshot_download
|
|
|
282 |
|
283 |
def convert_to_gif(video_path):
|
284 |
clip = mp.VideoFileClip(video_path)
|
285 |
+
clip = clip.with_fps(8)
|
286 |
+
clip = clip.resized(height=240)
|
287 |
gif_path = video_path.replace(".mp4", ".gif")
|
288 |
clip.write_gif(gif_path, fps=8)
|
289 |
return gif_path
|