Spaces:
Sleeping
Sleeping
Modify choices
Browse files
app.py
CHANGED
@@ -1096,7 +1096,7 @@ def prepare(raw_idx, text_embeddings, class_order):
|
|
1096 |
while class_idx in no_image_idxs:
|
1097 |
raw_idx = (raw_idx + 1) % len(babel_imagenet["EN"][0])
|
1098 |
idx = class_order[raw_idx]
|
1099 |
-
lang_class_idxs =
|
1100 |
class_idx = lang_class_idxs[idx]
|
1101 |
|
1102 |
img_idx = 0
|
@@ -1124,6 +1124,8 @@ def prepare(raw_idx, text_embeddings, class_order):
|
|
1124 |
choice_values[correct_choice_idx],
|
1125 |
]
|
1126 |
|
|
|
|
|
1127 |
choice_values = list(zip(choice_names, choice_values))
|
1128 |
|
1129 |
next_radio = gr.Radio(
|
@@ -1174,6 +1176,8 @@ def reroll(raw_idx, text_embeddings, class_order):
|
|
1174 |
choice_values[correct_choice_idx],
|
1175 |
]
|
1176 |
|
|
|
|
|
1177 |
choice_values = list(zip(choice_names, choice_values))
|
1178 |
|
1179 |
next_radio = gr.Radio(
|
|
|
1096 |
while class_idx in no_image_idxs:
|
1097 |
raw_idx = (raw_idx + 1) % len(babel_imagenet["EN"][0])
|
1098 |
idx = class_order[raw_idx]
|
1099 |
+
lang_class_idxs = list(range(1000))
|
1100 |
class_idx = lang_class_idxs[idx]
|
1101 |
|
1102 |
img_idx = 0
|
|
|
1124 |
choice_values[correct_choice_idx],
|
1125 |
]
|
1126 |
|
1127 |
+
for i, name in enumerate(choice_names):
|
1128 |
+
choice_names[i] = f"({i+1}) {name}"
|
1129 |
choice_values = list(zip(choice_names, choice_values))
|
1130 |
|
1131 |
next_radio = gr.Radio(
|
|
|
1176 |
choice_values[correct_choice_idx],
|
1177 |
]
|
1178 |
|
1179 |
+
for i, name in enumerate(choice_names):
|
1180 |
+
choice_names[i] = f"({i+1}) {name}"
|
1181 |
choice_values = list(zip(choice_names, choice_values))
|
1182 |
|
1183 |
next_radio = gr.Radio(
|