fffiloni commited on
Commit
6a87ed0
·
1 Parent(s): 12c01c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -33,6 +33,14 @@ def run_inference(prompt, video_path, condition, video_length):
33
 
34
  output_path = 'output/'
35
  os.makedirs(output_path, exist_ok=True)
 
 
 
 
 
 
 
 
36
  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"
37
  subprocess.run(command, shell=True)
38
 
 
33
 
34
  output_path = 'output/'
35
  os.makedirs(output_path, exist_ok=True)
36
+
37
+ # Construct the video path
38
+ video_path_output = os.path.join(output_path, f"{prompt}.mp4")
39
+
40
+ # Check if the file already exists
41
+ if os.path.exists(video_path_output):
42
+ # Delete the existing file
43
+ os.remove(video_path_output)
44
  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"
45
  subprocess.run(command, shell=True)
46