Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -98,16 +98,6 @@ def resize_video(input_file):
|
|
| 98 |
|
| 99 |
def run_inference(prompt, video_path, condition, video_length):
|
| 100 |
|
| 101 |
-
# Specify the input and output paths
|
| 102 |
-
input_vid = video_path
|
| 103 |
-
|
| 104 |
-
# Call the function to resize the video
|
| 105 |
-
resized_video_path = resize_video(input_vid)
|
| 106 |
-
print(f"PATH TO RESIZED: {resized_video_path}")
|
| 107 |
-
width, height, fps = get_video_dimension(resized_video_path)
|
| 108 |
-
|
| 109 |
-
print(f"{width} x {height} | {fps}")
|
| 110 |
-
|
| 111 |
output_path = 'output/'
|
| 112 |
os.makedirs(output_path, exist_ok=True)
|
| 113 |
|
|
@@ -120,9 +110,9 @@ def run_inference(prompt, video_path, condition, video_length):
|
|
| 120 |
os.remove(video_path_output)
|
| 121 |
|
| 122 |
if video_length > 12:
|
| 123 |
-
command = f"python inference.py --prompt '{prompt}' --condition '{condition}' --video_path '{
|
| 124 |
else:
|
| 125 |
-
command = f"python inference.py --prompt '{prompt}' --condition '{condition}' --video_path '{
|
| 126 |
subprocess.run(command, shell=True)
|
| 127 |
|
| 128 |
# Construct the video path
|
|
|
|
| 98 |
|
| 99 |
def run_inference(prompt, video_path, condition, video_length):
|
| 100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
output_path = 'output/'
|
| 102 |
os.makedirs(output_path, exist_ok=True)
|
| 103 |
|
|
|
|
| 110 |
os.remove(video_path_output)
|
| 111 |
|
| 112 |
if video_length > 12:
|
| 113 |
+
command = f"python inference.py --prompt '{prompt}' --condition '{condition}' --video_path '{video_path}' --output_path '{output_path}' --width {width} --height {height} --fps {fps} --video_length {video_length} --is_long_video"
|
| 114 |
else:
|
| 115 |
+
command = f"python inference.py --prompt '{prompt}' --condition '{condition}' --video_path '{video_path}' --output_path '{output_path}' --width {width} --height {height} --fps {fps} --video_length {video_length}"
|
| 116 |
subprocess.run(command, shell=True)
|
| 117 |
|
| 118 |
# Construct the video path
|