Update app.py
Browse files
app.py
CHANGED
@@ -253,44 +253,25 @@ with block:
|
|
253 |
|
254 |
path_ = download_leaderboard_dataset()
|
255 |
# gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
|
256 |
-
|
257 |
-
# Add Checkboxes for Filtering
|
258 |
-
with gr.Row():
|
259 |
-
selected_patterns = gr.CheckboxGroup(
|
260 |
-
choices=["Pattern A", "Pattern B", "Pattern C"],
|
261 |
-
label="Select Patterns"
|
262 |
-
)
|
263 |
-
selected_difficulty = gr.CheckboxGroup(
|
264 |
-
choices=["Easy", "Medium", "Hard"],
|
265 |
-
label="Select Difficulty"
|
266 |
-
)
|
267 |
-
|
268 |
# ENVIRONMENT TABS
|
269 |
with gr.Tabs() as tabs: # elem_classes="tab-buttons"
|
270 |
for env_index in range(0, len(hivex_envs)):
|
271 |
hivex_env = hivex_envs[env_index]
|
272 |
with gr.Tab(f"{hivex_env['title']}") as env_tabs:
|
273 |
-
|
274 |
-
# Apply filtering based on selected checkboxes
|
275 |
for task_id in range(0, hivex_env["task_count"]):
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
row_count
|
287 |
-
|
288 |
-
gr_dataframe = gr.components.Dataframe(
|
289 |
-
value=data,
|
290 |
-
headers=["User", "Model"],
|
291 |
-
datatype=["markdown", "markdown"],
|
292 |
-
row_count=(row_count, 'fixed') # Set to the exact number of rows in the data
|
293 |
-
)
|
294 |
|
295 |
|
296 |
scheduler = BackgroundScheduler()
|
|
|
253 |
|
254 |
path_ = download_leaderboard_dataset()
|
255 |
# gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
256 |
# ENVIRONMENT TABS
|
257 |
with gr.Tabs() as tabs: # elem_classes="tab-buttons"
|
258 |
for env_index in range(0, len(hivex_envs)):
|
259 |
hivex_env = hivex_envs[env_index]
|
260 |
with gr.Tab(f"{hivex_env['title']}") as env_tabs:
|
261 |
+
# TASK TABS
|
|
|
262 |
for task_id in range(0, hivex_env["task_count"]):
|
263 |
+
task_title = convert_to_title_case(get_task(hivex_env["hivex_env"], task_id, path_))
|
264 |
+
with gr.TabItem(f"Task {task_id}: {task_title}"):
|
265 |
+
with gr.Row():
|
266 |
+
data = get_data(hivex_env["hivex_env"], task_id, path_)
|
267 |
+
row_count = len(data) # Number of rows in the data
|
268 |
+
|
269 |
+
gr_dataframe = gr.components.Dataframe(
|
270 |
+
value=data,
|
271 |
+
headers=["User", "Model"],
|
272 |
+
datatype=["markdown", "markdown"],
|
273 |
+
row_count=(row_count, 'fixed') # Set to the exact number of rows in the data
|
274 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
275 |
|
276 |
|
277 |
scheduler = BackgroundScheduler()
|