akhaliq HF staff commited on
Commit
3e2f0b7
1 Parent(s): 9ee8a8e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -20,6 +20,9 @@ model = snapshot_download(repo_id="akhaliq/frame-interpolation-film-style")
20
 
21
  interpolator = interpolator.Interpolator(model, None)
22
 
 
 
 
23
  def resize(width,img):
24
  basewidth = width
25
  img = Image.open(img)
@@ -52,10 +55,8 @@ def predict(frame1, frame2, times_to_interpolate):
52
  frames = list(
53
  util.interpolate_recursively_from_files(
54
  input_frames, times_to_interpolate, interpolator))
55
- ffmpeg_path = util.get_ffmpeg_path()
56
- mediapy.set_ffmpeg(ffmpeg_path)
57
- out_path = "out.mp4"
58
- mediapy.write_video(str(out_path), frames, fps=30)
59
  return out_path
60
 
61
  title="frame-interpolation"
 
20
 
21
  interpolator = interpolator.Interpolator(model, None)
22
 
23
+ ffmpeg_path = util.get_ffmpeg_path()
24
+ mediapy.set_ffmpeg(ffmpeg_path)
25
+
26
  def resize(width,img):
27
  basewidth = width
28
  img = Image.open(img)
 
55
  frames = list(
56
  util.interpolate_recursively_from_files(
57
  input_frames, times_to_interpolate, interpolator))
58
+
59
+ mediapy.write_video("out.mp4", frames, fps=30)
 
 
60
  return out_path
61
 
62
  title="frame-interpolation"