Spaces:
Runtime error
Runtime error
Anonymous Authors
commited on
Commit
·
6f0fd24
1
Parent(s):
d19cc25
Update app.py
Browse files
app.py
CHANGED
@@ -38,7 +38,7 @@ def get_nearest(adjective, profession, model, no):
|
|
38 |
neighbors = ds.select(index[ix][1:25])
|
39 |
neighbor_images = neighbors["image"]
|
40 |
neighbor_captions = [caption.split("/")[-1] for caption in neighbors["image_path"]]
|
41 |
-
neighbor_captions = [' '.join(caption.split("_")[4:-3]) for caption in neighbor_captions]
|
42 |
neighbor_models = neighbors["model"]
|
43 |
neighbor_captions = [f"{a} {b}" for a,b in zip(neighbor_captions,neighbor_models)]
|
44 |
return image, list(zip(neighbor_images, neighbor_captions))
|
|
|
38 |
neighbors = ds.select(index[ix][1:25])
|
39 |
neighbor_images = neighbors["image"]
|
40 |
neighbor_captions = [caption.split("/")[-1] for caption in neighbors["image_path"]]
|
41 |
+
# neighbor_captions = [' '.join(caption.split("_")[4:-3]) for caption in neighbor_captions]
|
42 |
neighbor_models = neighbors["model"]
|
43 |
neighbor_captions = [f"{a} {b}" for a,b in zip(neighbor_captions,neighbor_models)]
|
44 |
return image, list(zip(neighbor_images, neighbor_captions))
|