ankitkr1499 commited on
Commit
e608753
·
verified ·
1 Parent(s): 82906eb

Update image_search.py

Browse files
Files changed (1) hide show
  1. image_search.py +7 -0
image_search.py CHANGED
@@ -418,3 +418,10 @@ def load_custom_model(model_dir=".", base_image_dir="flickr8k/Flicker8k_Dataset"
418
  fixed_paths.append(path)
419
 
420
  return nn_model, image_embeddings, fixed_paths
 
 
 
 
 
 
 
 
418
  fixed_paths.append(path)
419
 
420
  return nn_model, image_embeddings, fixed_paths
421
+
422
+ # Inside image_search.py
423
+
424
+ def update_custom_image_paths(folder_path):
425
+ global custom_image_paths
426
+ custom_image_paths = [os.path.join(folder_path, name) for name in os.listdir(folder_path) if name.lower().endswith((".jpg", ".jpeg", ".png"))]
427
+