RobotJelly commited on
Commit
ad44212
·
1 Parent(s): 950373e
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -31,7 +31,7 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
31
  # taking features vectors
32
  #photo_features = np.load("./features.npy")
33
 
34
- IMAGES_DIR = './photos/'
35
  #def show_output_image(matched_images) :
36
  #image=[]
37
  #for photo_id in matched_images:
@@ -75,7 +75,7 @@ with open(emb_filename, 'rb') as fIn:
75
  img_names, img_emb = pickle.load(fIn)
76
 
77
  def display_matches(indices):
78
- best_matched_images = [Image.open(os.path.join("photos/", img_names[best_img['corpus_id']])) for best_img in indices]
79
  return best_matched_images
80
 
81
  def image_search(search_text, search_image, option):
 
31
  # taking features vectors
32
  #photo_features = np.load("./features.npy")
33
 
34
+ IMAGES_DIR = './photos'
35
  #def show_output_image(matched_images) :
36
  #image=[]
37
  #for photo_id in matched_images:
 
75
  img_names, img_emb = pickle.load(fIn)
76
 
77
  def display_matches(indices):
78
+ best_matched_images = [Image.open(os.path.join(IMAGES_DIR, img_names[best_img['corpus_id']])) for best_img in indices]
79
  return best_matched_images
80
 
81
  def image_search(search_text, search_image, option):