cakiki commited on
Commit
c504986
·
1 Parent(s): 8609803

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
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
- with gr.Row():
29
- gender = gr.Radio(gender_labels, label="Gender label")
30
- ethnicity = gr.Radio(ethnicity_labels, label="Ethnicity label")
31
- model = gr.Radio(models, label="Model")
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])