Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ transform_image = transforms.Compose(
|
|
28 |
|
29 |
|
30 |
@spaces.GPU
|
31 |
-
def fn(vid,
|
32 |
# Load the video using moviepy
|
33 |
video = mp.VideoFileClip(vid)
|
34 |
|
@@ -122,7 +122,7 @@ with gr.Blocks() as demo:
|
|
122 |
|
123 |
|
124 |
examples = gr.Examples(
|
125 |
-
["rickroll-2sec.mp4", "images.webp"],
|
126 |
inputs=in_video,
|
127 |
outputs=[stream_image, out_video],
|
128 |
fn=fn,
|
@@ -132,7 +132,7 @@ with gr.Blocks() as demo:
|
|
132 |
|
133 |
submit_button.click(
|
134 |
fn,
|
135 |
-
inputs=[in_video,
|
136 |
outputs=[stream_image, out_video],
|
137 |
)
|
138 |
|
|
|
28 |
|
29 |
|
30 |
@spaces.GPU
|
31 |
+
def fn(vid, bg_type="Color", bg_image=None, color="#00FF00", fps=0):
|
32 |
# Load the video using moviepy
|
33 |
video = mp.VideoFileClip(vid)
|
34 |
|
|
|
122 |
|
123 |
|
124 |
examples = gr.Examples(
|
125 |
+
[("rickroll-2sec.mp4", "Image", "images.webp"), ("rickroll-2sec.mp4", "Color")],
|
126 |
inputs=in_video,
|
127 |
outputs=[stream_image, out_video],
|
128 |
fn=fn,
|
|
|
132 |
|
133 |
submit_button.click(
|
134 |
fn,
|
135 |
+
inputs=[in_video, bg_type, bg_image, color_picker, fps_slider],
|
136 |
outputs=[stream_image, out_video],
|
137 |
)
|
138 |
|