Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -20,10 +20,11 @@ def run_inference(prompt, video_path, condition, video_length):
|
|
20 |
video_length = int(video_length)
|
21 |
print(video_length)
|
22 |
command = f"python inference.py --prompt '{prompt}' --condition '{condition}' --video_path '{video_path}' --output_path 'outputs/' --video_length {video_length} --smoother_steps 19 20"
|
23 |
-
|
24 |
-
output = f"outputs/{prompt}.mp4"
|
25 |
-
return "done", output
|
26 |
|
|
|
|
|
|
|
27 |
|
28 |
|
29 |
|
@@ -46,6 +47,6 @@ with gr.Blocks() as demo:
|
|
46 |
condition,
|
47 |
video_length
|
48 |
],
|
49 |
-
outputs=[
|
50 |
|
51 |
demo.queue(max_size=12).launch()
|
|
|
20 |
video_length = int(video_length)
|
21 |
print(video_length)
|
22 |
command = f"python inference.py --prompt '{prompt}' --condition '{condition}' --video_path '{video_path}' --output_path 'outputs/' --video_length {video_length} --smoother_steps 19 20"
|
23 |
+
subprocess.run(command, shell=True)
|
|
|
|
|
24 |
|
25 |
+
# Construct the video path
|
26 |
+
video_path_output = f"'output'/{prompt}.mp4"
|
27 |
+
return "done", video_path_output
|
28 |
|
29 |
|
30 |
|
|
|
47 |
condition,
|
48 |
video_length
|
49 |
],
|
50 |
+
outputs=[status, video_res])
|
51 |
|
52 |
demo.queue(max_size=12).launch()
|