philippds commited on
Commit
693b619
·
verified ·
1 Parent(s): 4b1f946

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -298,11 +298,13 @@ with block:
298
  for env_index in range(0, len(hivex_envs)):
299
  hivex_env = hivex_envs[env_index]
300
  with gr.Tab(f"{hivex_env['title']}") as env_tabs:
301
- # ADD CHECK BOX GROUP TO SELECT DIFFICULTY / PATTERN IDs
 
 
 
 
302
  if dp_key is not None:
303
  gr.CheckboxGroup([str(dp_id) for dp_id in difficulty_pattern_ids], label=dp_key)
304
- else:
305
- gr.HTML("<p>No difficulty or pattern data available for this environment.</p>")
306
 
307
  # TASK TABS
308
  for task_id in range(0, hivex_env["task_count"]):
 
298
  for env_index in range(0, len(hivex_envs)):
299
  hivex_env = hivex_envs[env_index]
300
  with gr.Tab(f"{hivex_env['title']}") as env_tabs:
301
+
302
+ # Call the function to get the actual values
303
+ dp_key, difficulty_pattern_ids = get_difficulty_pattern_ids_and_key(
304
+ hivex_env["hivex_env"], path_
305
+ )
306
  if dp_key is not None:
307
  gr.CheckboxGroup([str(dp_id) for dp_id in difficulty_pattern_ids], label=dp_key)
 
 
308
 
309
  # TASK TABS
310
  for task_id in range(0, hivex_env["task_count"]):