Spaces:
Configuration error
Configuration error
englert
commited on
Commit
·
2a06b8b
1
Parent(s):
c070174
update app.py # 4
Browse files
app.py
CHANGED
|
@@ -61,26 +61,23 @@ def predict(input_file, downsample_size):
|
|
| 61 |
# indices[np.asarray(rv_indices)] = 1
|
| 62 |
# print("images selected")
|
| 63 |
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
all_selected_imgs_path = [join(selected_directory, f) for f in os.listdir(selected_directory) if
|
| 79 |
-
isfile(join(selected_directory, f))]
|
| 80 |
|
| 81 |
zipf = zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED)
|
| 82 |
-
for i, f in enumerate(all_selected_imgs_path):
|
| 83 |
-
|
| 84 |
zipf.close()
|
| 85 |
print("selected images zipped")
|
| 86 |
|
|
|
|
| 61 |
# indices[np.asarray(rv_indices)] = 1
|
| 62 |
# print("images selected")
|
| 63 |
|
| 64 |
+
# global_ctr = 0
|
| 65 |
+
# for fp_i, file_path in enumerate([input_file]):
|
| 66 |
+
# for i, img in enumerate(video_reader(file_path,
|
| 67 |
+
# targetFPS=9,
|
| 68 |
+
# targetWidth=None,
|
| 69 |
+
# to_rgb=False)):
|
| 70 |
+
# if indices[global_ctr] == 1:
|
| 71 |
+
# cv2.imwrite(join(selected_directory, str(global_ctr) + ".jpg"), img)
|
| 72 |
+
# global_ctr += 1
|
| 73 |
+
# print("selected images extracted")
|
| 74 |
+
#
|
| 75 |
+
# all_selected_imgs_path = [join(selected_directory, f) for f in os.listdir(selected_directory) if
|
| 76 |
+
# isfile(join(selected_directory, f))]
|
|
|
|
|
|
|
|
|
|
| 77 |
|
| 78 |
zipf = zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED)
|
| 79 |
+
# for i, f in enumerate(all_selected_imgs_path):
|
| 80 |
+
# zipf.write(f, basename(f))
|
| 81 |
zipf.close()
|
| 82 |
print("selected images zipped")
|
| 83 |
|