fffiloni commited on
Commit
b985e31
β€’
1 Parent(s): a00a5d6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -13,9 +13,14 @@ def infer(video_frames, masks_frames):
13
  masks_folder = "inputs/object_removal/bmx-trees_mask"
14
 
15
  # Create the "results" folder if it doesn't exist
16
- output_folder = "results/bmx-trees"
17
  if not os.path.exists(output_folder):
18
  os.makedirs(output_folder)
 
 
 
 
 
19
 
20
  command = [
21
  f"python",
@@ -28,7 +33,7 @@ def infer(video_frames, masks_frames):
28
  execute_command(command)
29
 
30
  # Get the list of files in the "results" folder
31
- result_files = os.listdir(output_folder)
32
 
33
  return result_files
34
 
 
13
  masks_folder = "inputs/object_removal/bmx-trees_mask"
14
 
15
  # Create the "results" folder if it doesn't exist
16
+ output_folder = "results"
17
  if not os.path.exists(output_folder):
18
  os.makedirs(output_folder)
19
+
20
+ # Ensure the "bmx-trees" directory is also created if it doesn't exist
21
+ bmx_trees_folder = os.path.join(output_folder, "bmx-trees")
22
+ if not os.path.exists(bmx_trees_folder):
23
+ os.makedirs(bmx_trees_folder)
24
 
25
  command = [
26
  f"python",
 
33
  execute_command(command)
34
 
35
  # Get the list of files in the "results" folder
36
+ result_files = os.listdir(bmx_trees_folder)
37
 
38
  return result_files
39