Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,12 +16,12 @@ snapshot_download(
|
|
16 |
local_dir = folder_name
|
17 |
)
|
18 |
|
19 |
-
def process_video(video_path, prompt):
|
20 |
|
21 |
output_folder="noise_warp_output_folder"
|
22 |
output_video="output.mp4"
|
23 |
device="cuda"
|
24 |
-
num_steps=
|
25 |
|
26 |
try:
|
27 |
# Step 1: Warp the noise
|
@@ -54,13 +54,14 @@ with gr.Blocks() as demo:
|
|
54 |
with gr.Column():
|
55 |
input_video = gr.Video(label="Input Video")
|
56 |
prompt = gr.Textbox(label="Prompt")
|
|
|
57 |
submit_btn = gr.Button("Submit")
|
58 |
with gr.Column():
|
59 |
output_video = gr.Video(label="Result")
|
60 |
|
61 |
submit_btn.click(
|
62 |
fn = process_video,
|
63 |
-
inputs = [input_video, prompt],
|
64 |
outputs = [output_video]
|
65 |
)
|
66 |
|
|
|
16 |
local_dir = folder_name
|
17 |
)
|
18 |
|
19 |
+
def process_video(video_path, prompt, num_steps):
|
20 |
|
21 |
output_folder="noise_warp_output_folder"
|
22 |
output_video="output.mp4"
|
23 |
device="cuda"
|
24 |
+
num_steps=num_steps
|
25 |
|
26 |
try:
|
27 |
# Step 1: Warp the noise
|
|
|
54 |
with gr.Column():
|
55 |
input_video = gr.Video(label="Input Video")
|
56 |
prompt = gr.Textbox(label="Prompt")
|
57 |
+
num_steps = gr.Slider(label="Inference Steps", minimum=1, maximum=30, value=5, step=1)
|
58 |
submit_btn = gr.Button("Submit")
|
59 |
with gr.Column():
|
60 |
output_video = gr.Video(label="Result")
|
61 |
|
62 |
submit_btn.click(
|
63 |
fn = process_video,
|
64 |
+
inputs = [input_video, prompt, num_steps],
|
65 |
outputs = [output_video]
|
66 |
)
|
67 |
|