Spaces:
Runtime error
Runtime error
Anonymous Authors
commited on
Commit
•
875e3fd
1
Parent(s):
410bb7d
Update app.py
Browse files
app.py
CHANGED
@@ -41,7 +41,7 @@ def get_nearest(adjective, profession, model, no):
|
|
41 |
neighbor_captions = [caption.split("/")[-1] for caption in neighbors["image_path"]]
|
42 |
# neighbor_captions = [' '.join(caption.split("_")[4:-3]) for caption in neighbor_captions]
|
43 |
neighbor_models = neighbors["model"]
|
44 |
-
neighbor_captions = [f"{re.split(
|
45 |
return image, list(zip(neighbor_images, neighbor_captions))
|
46 |
|
47 |
with gr.Blocks() as demo:
|
|
|
41 |
neighbor_captions = [caption.split("/")[-1] for caption in neighbors["image_path"]]
|
42 |
# neighbor_captions = [' '.join(caption.split("_")[4:-3]) for caption in neighbor_captions]
|
43 |
neighbor_models = neighbors["model"]
|
44 |
+
neighbor_captions = [f"{re.split('Photo_portrait_of_an?_', a)[-1]} {b}" for a,b in zip(neighbor_captions,neighbor_models)]
|
45 |
return image, list(zip(neighbor_images, neighbor_captions))
|
46 |
|
47 |
with gr.Blocks() as demo:
|