Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -22,14 +22,13 @@ def get_nearest_64(gender, ethnicity, model, no):
|
|
22 |
neighbors = ds.select(index[ix][1:])
|
23 |
neighbor_images = neighbors["image"]
|
24 |
neighbor_captions = [caption.split("/")[-1] for caption in neighbors["image_path"]]
|
25 |
-
return image.resize(32,32), list(zip([i.resize(32,32) for i in neighbor_images], neighbor_captions))
|
26 |
|
27 |
with gr.Blocks() as demo:
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
no = gr.Radio(nos, label="Image number")
|
33 |
with gr.Row():
|
34 |
image = gr.Image(shape=(64,64))
|
35 |
gallery = gr.Gallery().style(grid=[2,4])
|
|
|
22 |
neighbors = ds.select(index[ix][1:])
|
23 |
neighbor_images = neighbors["image"]
|
24 |
neighbor_captions = [caption.split("/")[-1] for caption in neighbors["image_path"]]
|
25 |
+
return image.resize((32,32)), list(zip([i.resize((32,32)) for i in neighbor_images], neighbor_captions))
|
26 |
|
27 |
with gr.Blocks() as demo:
|
28 |
+
gender = gr.Radio(gender_labels, label="Gender label")
|
29 |
+
ethnicity = gr.Radio(ethnicity_labels, label="Ethnicity label")
|
30 |
+
model = gr.Radio(models, label="Model")
|
31 |
+
no = gr.Radio(nos, label="Image number")
|
|
|
32 |
with gr.Row():
|
33 |
image = gr.Image(shape=(64,64))
|
34 |
gallery = gr.Gallery().style(grid=[2,4])
|