Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -41,16 +41,17 @@ def run_inference(prompt, video_path, condition, video_length):
|
|
| 41 |
if os.path.exists(video_path_output):
|
| 42 |
# Delete the existing file
|
| 43 |
os.remove(video_path_output)
|
| 44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
subprocess.run(command, shell=True)
|
| 46 |
|
| 47 |
# Construct the video path
|
| 48 |
video_path_output = os.path.join(output_path, f"{prompt}.mp4")
|
| 49 |
return "done", video_path_output
|
| 50 |
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
#return f"{output_path}/{prompt}.mp4"
|
| 54 |
|
| 55 |
with gr.Blocks() as demo:
|
| 56 |
with gr.Column():
|
|
|
|
| 41 |
if os.path.exists(video_path_output):
|
| 42 |
# Delete the existing file
|
| 43 |
os.remove(video_path_output)
|
| 44 |
+
|
| 45 |
+
if video_length > 12:
|
| 46 |
+
command = f"python inference.py --prompt '{prompt}' --condition '{condition}' --video_path '{video_path}' --output_path '{output_path}' --video_length {video_length} --smoother_steps 19 20 --is_long_video"
|
| 47 |
+
else:
|
| 48 |
+
command = f"python inference.py --prompt '{prompt}' --condition '{condition}' --video_path '{video_path}' --output_path '{output_path}' --video_length {video_length} --smoother_steps 19 20"
|
| 49 |
subprocess.run(command, shell=True)
|
| 50 |
|
| 51 |
# Construct the video path
|
| 52 |
video_path_output = os.path.join(output_path, f"{prompt}.mp4")
|
| 53 |
return "done", video_path_output
|
| 54 |
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
with gr.Blocks() as demo:
|
| 57 |
with gr.Column():
|