Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
KlaudiaTH
commited on
Commit
·
5e9ed15
1
Parent(s):
53ae86b
Fix: Don't display Belebele in few-shot
Browse files
core.py
CHANGED
@@ -11,6 +11,7 @@ import style
|
|
11 |
|
12 |
TAB_STATE = 0 # FIXME
|
13 |
GSM8K_TASK_GROUP_NAME = "GSM8K" # FIXME
|
|
|
14 |
|
15 |
|
16 |
def init():
|
@@ -162,10 +163,21 @@ def fix_zeroshot(tasks: list[str | int | float], fewshot: bool = False):
|
|
162 |
choices.remove(GSM8K_TASK_GROUP_NAME)
|
163 |
except ValueError:
|
164 |
pass
|
165 |
-
|
|
|
|
|
|
|
|
|
|
|
166 |
else:
|
|
|
|
|
|
|
|
|
167 |
if TAB_STATE == 0:
|
168 |
-
value = [v for v in tasks if v in choices]
|
|
|
|
|
169 |
elif TAB_STATE == 1:
|
170 |
value = [v for v in tasks if v in choices]
|
171 |
shown_tasks = gr.CheckboxGroup(
|
@@ -190,6 +202,12 @@ def update_tab_tasks(id: int, fewshot: bool = False):
|
|
190 |
choices.remove(GSM8K_TASK_GROUP_NAME)
|
191 |
except ValueError:
|
192 |
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
values = choices.copy()
|
194 |
shown_tasks = gr.CheckboxGroup(
|
195 |
choices=choices,
|
|
|
11 |
|
12 |
TAB_STATE = 0 # FIXME
|
13 |
GSM8K_TASK_GROUP_NAME = "GSM8K" # FIXME
|
14 |
+
BELEBELE_TASK_GROUP_NAME = "BELEBELE" # FIXME
|
15 |
|
16 |
|
17 |
def init():
|
|
|
163 |
choices.remove(GSM8K_TASK_GROUP_NAME)
|
164 |
except ValueError:
|
165 |
pass
|
166 |
+
if TAB_STATE == 0:
|
167 |
+
value = [v for v in tasks if v in choices]
|
168 |
+
if BELEBELE_TASK_GROUP_NAME not in value:
|
169 |
+
value += [BELEBELE_TASK_GROUP_NAME]
|
170 |
+
elif TAB_STATE == 1:
|
171 |
+
value = [v for v in tasks if v in choices]
|
172 |
else:
|
173 |
+
try:
|
174 |
+
choices.remove(BELEBELE_TASK_GROUP_NAME)
|
175 |
+
except ValueError:
|
176 |
+
pass
|
177 |
if TAB_STATE == 0:
|
178 |
+
value = [v for v in tasks if v in choices]
|
179 |
+
if GSM8K_TASK_GROUP_NAME not in value:
|
180 |
+
value += [GSM8K_TASK_GROUP_NAME]
|
181 |
elif TAB_STATE == 1:
|
182 |
value = [v for v in tasks if v in choices]
|
183 |
shown_tasks = gr.CheckboxGroup(
|
|
|
202 |
choices.remove(GSM8K_TASK_GROUP_NAME)
|
203 |
except ValueError:
|
204 |
pass
|
205 |
+
else:
|
206 |
+
try:
|
207 |
+
choices.remove(BELEBELE_TASK_GROUP_NAME)
|
208 |
+
except ValueError:
|
209 |
+
pass
|
210 |
+
|
211 |
values = choices.copy()
|
212 |
shown_tasks = gr.CheckboxGroup(
|
213 |
choices=choices,
|