Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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:
|