fffiloni commited on
Commit
6fcb174
·
1 Parent(s): 8b015d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -16,14 +16,14 @@ for model_id in model_ids:
16
  import subprocess
17
 
18
  def run_inference(prompt, video_path, condition, video_length):
19
- print(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 '' --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"{prompt}.mp4"
27
  return "done", video_path_output
28
 
29
 
 
16
  import subprocess
17
 
18
  def run_inference(prompt, video_path, condition, video_length):
19
+
20
+ output_path = 'output/'
21
+ os.makedirs(output_path, exist_ok=True)
22
+ 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"
23
  subprocess.run(command, shell=True)
24
 
25
  # Construct the video path
26
+ video_path_output = os.path.join(output_path, f"{prompt}.mp4")
27
  return "done", video_path_output
28
 
29