Spaces:
Sleeping
Sleeping
xairesearch2023-advnet
commited on
Commit
•
635580d
1
Parent(s):
8860006
chnage k to Q
Browse files
app.py
CHANGED
@@ -74,6 +74,10 @@ if not JSON_DATASET_DIR.exists():
|
|
74 |
|
75 |
def generate_data(type_of_nns):
|
76 |
global NUMBER_OF_IMAGES
|
|
|
|
|
|
|
|
|
77 |
# randomly pick NUMBER_OF_IMAGES from the dataset with type type_of_nns
|
78 |
keys = list(all_data[type_of_nns].keys())
|
79 |
sample_data = random.sample(keys, NUMBER_OF_IMAGES)
|
@@ -305,7 +309,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
305 |
)
|
306 |
type_of_nns_dropdown = gr.Dropdown(
|
307 |
label="Type of NNs",
|
308 |
-
choices=["top1", "
|
309 |
value="top1",
|
310 |
)
|
311 |
|
|
|
74 |
|
75 |
def generate_data(type_of_nns):
|
76 |
global NUMBER_OF_IMAGES
|
77 |
+
|
78 |
+
if type_of_nns == "topQ":
|
79 |
+
type_of_nns = "topK"
|
80 |
+
|
81 |
# randomly pick NUMBER_OF_IMAGES from the dataset with type type_of_nns
|
82 |
keys = list(all_data[type_of_nns].keys())
|
83 |
sample_data = random.sample(keys, NUMBER_OF_IMAGES)
|
|
|
309 |
)
|
310 |
type_of_nns_dropdown = gr.Dropdown(
|
311 |
label="Type of NNs",
|
312 |
+
choices=["top1", "topQ"],
|
313 |
value="top1",
|
314 |
)
|
315 |
|