Spaces:
Paused
Paused
Update app.py
Browse files
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
|
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(
|
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 |
|