fffiloni commited on
Commit
3e9263a
β€’
1 Parent(s): 680708f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -51,6 +51,8 @@ sketch2 = gr.Image(image_mode="L",
51
  type="filepath",
52
  shape=None,
53
  invert_colors=False)
 
 
54
 
55
 
56
  def predict(frame1, frame2, times_to_interpolate):
@@ -67,7 +69,9 @@ def predict(frame1, frame2, times_to_interpolate):
67
  frames = list(
68
  util.interpolate_recursively_from_files(
69
  input_frames, times_to_interpolate, interpolator))
70
-
 
 
71
  mediapy.write_video("out.mp4", frames, fps=30)
72
  return "out.mp4"
73
 
@@ -76,4 +80,4 @@ description="This is a fork of the Gradio demo for FILM: Frame Interpolation for
76
  article = "<p style='text-align: center'><a href='https://film-net.github.io/' target='_blank'>FILM: Frame Interpolation for Large Motion</a> | <a href='https://github.com/google-research/frame-interpolation' target='_blank'>Github Repo</a></p>"
77
  custom_css = "style.css"
78
 
79
- gr.Interface(predict,[sketch1,sketch2,gr.inputs.Slider(minimum=2,maximum=4,step=1)],"playable_video",title=title,description=description,article=article, css=custom_css).launch(enable_queue=True)
 
51
  type="filepath",
52
  shape=None,
53
  invert_colors=False)
54
+
55
+ slider = gr.inputs.Slider(minimum=2,maximum=4,step=1)
56
 
57
 
58
  def predict(frame1, frame2, times_to_interpolate):
 
69
  frames = list(
70
  util.interpolate_recursively_from_files(
71
  input_frames, times_to_interpolate, interpolator))
72
+
73
+ print(frames)
74
+
75
  mediapy.write_video("out.mp4", frames, fps=30)
76
  return "out.mp4"
77
 
 
80
  article = "<p style='text-align: center'><a href='https://film-net.github.io/' target='_blank'>FILM: Frame Interpolation for Large Motion</a> | <a href='https://github.com/google-research/frame-interpolation' target='_blank'>Github Repo</a></p>"
81
  custom_css = "style.css"
82
 
83
+ gr.Interface(predict,[sketch1,sketch2,slider],"playable_video",title=title,description=description,article=article, css=custom_css).launch(enable_queue=True)