cakiki commited on
Commit
442d337
1 Parent(s): 1450198

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -10
app.py CHANGED
@@ -25,16 +25,13 @@ def get_nearest_64(gender, ethnicity, model, no):
25
  return image, list(zip(neighbor_images, neighbor_captions))
26
 
27
  with gr.Blocks() as demo:
 
 
 
 
 
28
  with gr.Row():
29
- with gr.Column():
30
- gender = gr.Radio(gender_labels, label="Gender label")
31
- ethnicity = gr.Radio(ethnicity_labels, label="Ethnicity label")
32
- model = gr.Radio(models, label="Model")
33
- no = gr.Radio(nos, label="Image number")
34
- button = gr.Button(value="Get nearest neighbors")
35
- with gr.Column():
36
- image = gr.Image(shape=(64,64))
37
- gallery = gr.Gallery().style(grid=[2,4])
38
-
39
  button.click(get_nearest_64, inputs=[gender, ethnicity, model, no], outputs=[image, gallery])
40
  demo.launch()
 
25
  return image, list(zip(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
+ button = gr.Button(value="Get nearest neighbors")
33
  with gr.Row():
34
+ image = gr.Image()
35
+ gallery = gr.Gallery().style(grid=8)
 
 
 
 
 
 
 
 
36
  button.click(get_nearest_64, inputs=[gender, ethnicity, model, no], outputs=[image, gallery])
37
  demo.launch()