akhaliq HF staff commited on
Commit
83ec061
1 Parent(s): ae6e6c2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -7,13 +7,15 @@ import tensorflow as tf
7
  import mediapy
8
  from PIL import Image
9
  from eval import interpolator, util
10
- import tensorflow as tf
11
  import gradio as gr
12
 
13
  from huggingface_hub import snapshot_download
14
 
15
  from image_tools.sizes import resize_and_crop
16
 
 
 
 
17
 
18
 
19
  model = snapshot_download(repo_id="akhaliq/frame-interpolation-film-style")
@@ -57,7 +59,8 @@ def predict(frame1, frame2, times_to_interpolate):
57
  input_frames, times_to_interpolate, interpolator))
58
 
59
  mediapy.write_video("out.mp4", frames, fps=30)
60
- frames = None
 
61
  return "out.mp4"
62
 
63
  title="frame-interpolation"
 
7
  import mediapy
8
  from PIL import Image
9
  from eval import interpolator, util
 
10
  import gradio as gr
11
 
12
  from huggingface_hub import snapshot_download
13
 
14
  from image_tools.sizes import resize_and_crop
15
 
16
+ import gc
17
+
18
+
19
 
20
 
21
  model = snapshot_download(repo_id="akhaliq/frame-interpolation-film-style")
 
59
  input_frames, times_to_interpolate, interpolator))
60
 
61
  mediapy.write_video("out.mp4", frames, fps=30)
62
+ del frames
63
+ gc.collect()
64
  return "out.mp4"
65
 
66
  title="frame-interpolation"