fffiloni commited on
Commit
97a5903
·
verified ·
1 Parent(s): b99bf64

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -32,16 +32,20 @@ def check_for_mp4_in_outputs(given_folder):
32
 
33
 
34
  def infer():
 
 
35
  # Get the current timestamp
36
  timestamp = datetime.datetime.now().strftime("%Y%m%d%H%M%S")
37
 
38
  output_folder_name = f"results_{timestamp}"
39
 
40
  # Example: Run the inference script (replace with your actual command)
41
- run_command(f"{sys.executable} inference_keep.py -i=./assets/examples/synthetic_1.mp4 -o={output_folder_name} --has_aligned --save_video -s=1")
42
 
43
  # Call the function and print the result
44
- mp4_file_path = check_for_mp4_in_outputs(output_folder_name)
 
 
45
  print(mp4_file_path)
46
 
47
  print(f"RESULT: {mp4_file_path}")
 
32
 
33
 
34
  def infer():
35
+
36
+ filepath = "./assets/examples/synthetic_1.mp4"
37
  # Get the current timestamp
38
  timestamp = datetime.datetime.now().strftime("%Y%m%d%H%M%S")
39
 
40
  output_folder_name = f"results_{timestamp}"
41
 
42
  # Example: Run the inference script (replace with your actual command)
43
+ run_command(f"{sys.executable} inference_keep.py -i={filepath} -o={output_folder_name} --has_aligned --save_video -s=1")
44
 
45
  # Call the function and print the result
46
+ this_infer_folder = os.path.splitext(os.path.basename(filepath))[0]
47
+ joined_path = os.path.join(output_folder_name, this_infer_folder)
48
+ mp4_file_path = check_for_mp4_in_outputs(joined_path)
49
  print(mp4_file_path)
50
 
51
  print(f"RESULT: {mp4_file_path}")