cakiki commited on
Commit
769e78e
1 Parent(s): a8cea13

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -20,7 +20,7 @@ def get_nearest_64(gender, ethnicity, model, no):
20
  image = ds.select([index[ix][0]])["image"][0]
21
  neighbors = ds.select(index[ix][1:])
22
  neighbor_images = neighbors["image"]
23
- neighbor_captions = neighbors["image_path"]
24
  return image, list(zip(neighbor_images, neighbor_captions))
25
 
26
  with gr.Blocks() as demo:
 
20
  image = ds.select([index[ix][0]])["image"][0]
21
  neighbors = ds.select(index[ix][1:])
22
  neighbor_images = neighbors["image"]
23
+ neighbor_captions = [caption.split("/")[-1] for caption in neighbors["image_path"]]
24
  return image, list(zip(neighbor_images, neighbor_captions))
25
 
26
  with gr.Blocks() as demo: