Anonymous Authors
commited on
Commit
·
e2322f3
1
Parent(s):
7674524
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ nos = [1,2,3,4,5,6,7,8,9,10]
|
|
14 |
|
15 |
ds = load_from_disk("color-sorted")
|
16 |
|
17 |
-
def get_nearest_64(gender, ethnicity, model, no
|
18 |
df = ds.remove_columns(["image","image_path"]).to_pandas()
|
19 |
ix = df.loc[(df['ethnicity'] == ethnicity) & (df['gender'] == gender) & (df['no'] == no) & (df['model'] == model)].index[0]
|
20 |
image = ds.select([index[ix][0]])["image"][0]
|
@@ -33,7 +33,6 @@ with gr.Blocks() as demo:
|
|
33 |
with gr.Row():
|
34 |
with gr.Column():
|
35 |
model = gr.Radio(models, label="Model")
|
36 |
-
index = gr.Radio(indexes, label="Visual vocabulary size")
|
37 |
gender = gr.Radio(gender_labels, label="Gender label")
|
38 |
with gr.Column():
|
39 |
ethnicity = gr.Radio(ethnicity_labels, label="Ethnicity label")
|
|
|
14 |
|
15 |
ds = load_from_disk("color-sorted")
|
16 |
|
17 |
+
def get_nearest_64(gender, ethnicity, model, no):
|
18 |
df = ds.remove_columns(["image","image_path"]).to_pandas()
|
19 |
ix = df.loc[(df['ethnicity'] == ethnicity) & (df['gender'] == gender) & (df['no'] == no) & (df['model'] == model)].index[0]
|
20 |
image = ds.select([index[ix][0]])["image"][0]
|
|
|
33 |
with gr.Row():
|
34 |
with gr.Column():
|
35 |
model = gr.Radio(models, label="Model")
|
|
|
36 |
gender = gr.Radio(gender_labels, label="Gender label")
|
37 |
with gr.Column():
|
38 |
ethnicity = gr.Radio(ethnicity_labels, label="Ethnicity label")
|