Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -141,10 +141,10 @@ def batch_detection(zip_file, timelapse, det_conf_thres):
|
|
141 |
os.makedirs(extract_path)
|
142 |
|
143 |
json_save_path = os.path.join(extract_path, "results.json")
|
144 |
-
with ZipFile(zip_file.name) as zfile:
|
145 |
-
|
146 |
# Check the contents of the extracted folder
|
147 |
-
|
148 |
|
149 |
if len(extracted_files) == 1 and os.path.isdir(os.path.join(extract_path, extracted_files[0])):
|
150 |
tgt_folder_path = os.path.join(extract_path, extracted_files[0])
|
|
|
141 |
os.makedirs(extract_path)
|
142 |
|
143 |
json_save_path = os.path.join(extract_path, "results.json")
|
144 |
+
# with ZipFile(zip_file.name) as zfile:
|
145 |
+
# zfile.extractall(extract_path)
|
146 |
# Check the contents of the extracted folder
|
147 |
+
extracted_files = os.listdir(extract_path)
|
148 |
|
149 |
if len(extracted_files) == 1 and os.path.isdir(os.path.join(extract_path, extracted_files[0])):
|
150 |
tgt_folder_path = os.path.join(extract_path, extracted_files[0])
|