kony1337 commited on
Commit
c36b4d5
1 Parent(s): 8c9a540

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -65,15 +65,14 @@ def predict(frame1, frame2, times_to_interpolate, model_name):
65
  resize_img("test1.png", "test2.png")
66
  input_frames = ["test1.png", "resized_img2.png"]
67
 
68
- frames = list(
69
- util.interpolate_recursively_from_files(
70
- input_frames, times_to_interpolate, model))
 
 
71
 
72
  return frames
73
 
74
- mediapy.write_video("out.mp4", frames, fps=30)
75
- return "out.mp4"
76
-
77
 
78
  title = "frame-interpolation"
79
  description = "Gradio demo for FILM: Frame Interpolation for Large Scene Motion. To use it, simply upload your images and add the times to interpolate number or click on one of the examples to load them. Read more at the links below."
 
65
  resize_img("test1.png", "test2.png")
66
  input_frames = ["test1.png", "resized_img2.png"]
67
 
68
+ frames = []
69
+ for frame in util.interpolate_recursively_from_files(input_frames, times_to_interpolate, model):
70
+ img = Image.fromarray(frame)
71
+ resized_img = img.resize((256, 256))
72
+ frames.append(np.array(resized_img))
73
 
74
  return frames
75
 
 
 
 
76
 
77
  title = "frame-interpolation"
78
  description = "Gradio demo for FILM: Frame Interpolation for Large Scene Motion. To use it, simply upload your images and add the times to interpolate number or click on one of the examples to load them. Read more at the links below."