Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -50,9 +50,12 @@ def infer(video_frames, masks_frames, project_name):
|
|
| 50 |
# Print the image name and its corresponding save path
|
| 51 |
print(f"Image {idx + 1}: {image_name} copied to {destination_path}")
|
| 52 |
|
| 53 |
-
video_frames_folder = "inputs/object_removal/bmx-trees"
|
| 54 |
-
masks_folder = "inputs/object_removal/bmx-trees_mask"
|
| 55 |
|
|
|
|
|
|
|
|
|
|
| 56 |
# Create the "results" folder if it doesn't exist
|
| 57 |
output_folder = "results"
|
| 58 |
if not os.path.exists(output_folder):
|
|
@@ -80,14 +83,14 @@ def infer(video_frames, masks_frames, project_name):
|
|
| 80 |
print(item)
|
| 81 |
|
| 82 |
# List the content of the "bmx-trees" folder within "results"
|
| 83 |
-
|
| 84 |
-
|
| 85 |
|
| 86 |
-
print(f"Contents of the {
|
| 87 |
-
for item in
|
| 88 |
print(item)
|
| 89 |
|
| 90 |
-
return "done",
|
| 91 |
|
| 92 |
css="""
|
| 93 |
#col-container{
|
|
|
|
| 50 |
# Print the image name and its corresponding save path
|
| 51 |
print(f"Image {idx + 1}: {image_name} copied to {destination_path}")
|
| 52 |
|
| 53 |
+
#video_frames_folder = "inputs/object_removal/bmx-trees"
|
| 54 |
+
#masks_folder = "inputs/object_removal/bmx-trees_mask"
|
| 55 |
|
| 56 |
+
video_frames_folder = f"{my_video_directory}"
|
| 57 |
+
masks_folder = f"{my_masks_directory}"
|
| 58 |
+
|
| 59 |
# Create the "results" folder if it doesn't exist
|
| 60 |
output_folder = "results"
|
| 61 |
if not os.path.exists(output_folder):
|
|
|
|
| 83 |
print(item)
|
| 84 |
|
| 85 |
# List the content of the "bmx-trees" folder within "results"
|
| 86 |
+
results_folder = os.path.join(output_folder, f"{project_name}")
|
| 87 |
+
results_folder_content = [os.path.join(results_folder, item) for item in os.listdir(results_folder)]
|
| 88 |
|
| 89 |
+
print(f"Contents of the {results_folder} folder:")
|
| 90 |
+
for item in results_content:
|
| 91 |
print(item)
|
| 92 |
|
| 93 |
+
return "done", results_content[0], results_content[1]
|
| 94 |
|
| 95 |
css="""
|
| 96 |
#col-container{
|