Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -91,9 +91,11 @@ def download_gitlab_repo():
|
|
91 |
print("Upload complete")
|
92 |
|
93 |
def get_all_files_in_folder(temp_dir, partial_paths):
|
|
|
94 |
all_files = []
|
95 |
|
96 |
for partial_path in partial_paths:
|
|
|
97 |
target_dir = os.path.join(temp_dir, partial_path)
|
98 |
print(target_dir)
|
99 |
|
@@ -136,13 +138,16 @@ def process_directory(directory, partial_paths=None, file_paths=None):
|
|
136 |
|
137 |
files = []
|
138 |
if partial_paths:
|
|
|
139 |
files = get_all_files_in_folder(tmpdirname, partial_paths)
|
140 |
else:
|
|
|
141 |
for root, _, files_list in os.walk(tmpdirname):
|
142 |
for file in files_list:
|
143 |
files.append(os.path.join(root, file))
|
144 |
|
145 |
if file_paths:
|
|
|
146 |
files += [get_file(tmpdirname, file_path) for file_path in file_paths]
|
147 |
|
148 |
print(f"Total number of files: {len(files)}")
|
|
|
91 |
print("Upload complete")
|
92 |
|
93 |
def get_all_files_in_folder(temp_dir, partial_paths):
|
94 |
+
print("inside the get all files in folder method")
|
95 |
all_files = []
|
96 |
|
97 |
for partial_path in partial_paths:
|
98 |
+
print("inner method of get all files in folder")
|
99 |
target_dir = os.path.join(temp_dir, partial_path)
|
100 |
print(target_dir)
|
101 |
|
|
|
138 |
|
139 |
files = []
|
140 |
if partial_paths:
|
141 |
+
print("Go in partial_paths")
|
142 |
files = get_all_files_in_folder(tmpdirname, partial_paths)
|
143 |
else:
|
144 |
+
print("wtf")
|
145 |
for root, _, files_list in os.walk(tmpdirname):
|
146 |
for file in files_list:
|
147 |
files.append(os.path.join(root, file))
|
148 |
|
149 |
if file_paths:
|
150 |
+
print("Go in normal paths")
|
151 |
files += [get_file(tmpdirname, file_path) for file_path in file_paths]
|
152 |
|
153 |
print(f"Total number of files: {len(files)}")
|