Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
76 |
-
|
|
|
|
|
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],
|
|
|
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)
|