Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,8 +33,8 @@ def get_frame_count_in_duration(filepath):
|
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
-
|
| 37 |
def run_inference(prompt, video_path, condition, video_length):
|
|
|
|
| 38 |
|
| 39 |
output_path = 'output/'
|
| 40 |
os.makedirs(output_path, exist_ok=True)
|
|
@@ -47,8 +47,11 @@ def run_inference(prompt, video_path, condition, video_length):
|
|
| 47 |
# Delete the existing file
|
| 48 |
os.remove(video_path_output)
|
| 49 |
|
| 50 |
-
|
| 51 |
-
|
|
|
|
|
|
|
|
|
|
| 52 |
subprocess.run(command, shell=True)
|
| 53 |
|
| 54 |
# Construct the video path
|
|
|
|
| 33 |
|
| 34 |
|
| 35 |
|
|
|
|
| 36 |
def run_inference(prompt, video_path, condition, video_length):
|
| 37 |
+
|
| 38 |
|
| 39 |
output_path = 'output/'
|
| 40 |
os.makedirs(output_path, exist_ok=True)
|
|
|
|
| 47 |
# Delete the existing file
|
| 48 |
os.remove(video_path_output)
|
| 49 |
|
| 50 |
+
if video_length > 12:
|
| 51 |
+
command = f"python inference.py --prompt '{prompt}' --condition '{condition}' --video_path '{video_path}' --output_path '{output_path}' --video_length {video_length}"
|
| 52 |
+
else:
|
| 53 |
+
command = f"python inference.py --prompt '{prompt}' --condition '{condition}' --video_path '{video_path}' --output_path '{output_path}' --video_length {video_length} --is_long_video"
|
| 54 |
+
|
| 55 |
subprocess.run(command, shell=True)
|
| 56 |
|
| 57 |
# Construct the video path
|