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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -53,6 +53,8 @@ sketch2 = gr.Image(image_mode="L",
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):
@@ -70,14 +72,15 @@ def predict(frame1, frame2, times_to_interpolate):
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
 
78
  title="sketch-frame-interpolation"
79
  description="This is a fork of the Gradio demo for FILM: Frame Interpolation for Large Scene Motion from @akhaliq, but using sketches instead of images. This could be very useful for the animation industry :) <br /> To use it, simply draw your sketches and add the times to interpolate number. Read more at the links below."
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)
 
53
  invert_colors=False)
54
 
55
  slider = gr.inputs.Slider(minimum=2,maximum=4,step=1)
56
+
57
+ gallery_out = gradio.Gallery(self, Β·Β·Β·)
58
 
59
 
60
  def predict(frame1, frame2, times_to_interpolate):
 
72
  util.interpolate_recursively_from_files(
73
  input_frames, times_to_interpolate, interpolator))
74
 
 
75
 
76
+
77
+ #mediapy.write_video("out.mp4", frames, fps=30)
78
+ #return "out.mp4"
79
+ return frames
80
 
81
  title="sketch-frame-interpolation"
82
  description="This is a fork of the Gradio demo for FILM: Frame Interpolation for Large Scene Motion from @akhaliq, but using sketches instead of images. This could be very useful for the animation industry :) <br /> To use it, simply draw your sketches and add the times to interpolate number. Read more at the links below."
83
  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>"
84
  custom_css = "style.css"
85
 
86
+ gr.Interface(predict,[sketch1,sketch2,slider],gr.Gallery(),title=title,description=description,article=article, css=custom_css).launch(enable_queue=True)