orionweller commited on
Commit
33d5719
1 Parent(s): f1fa713

remove description

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -465,7 +465,11 @@ function(goalUrlObject) {
465
  def update_url_task(event: gr.SelectData, current_task_language: dict, language_per_task: dict):
466
  current_task_language["task"] = event.target.id
467
  # Either use the cached language for this task or the 1st language
468
- current_task_language["language"] = language_per_task.get(event.target.id, event.target.children[1].children[0].id)
 
 
 
 
469
  return current_task_language, language_per_task
470
 
471
  def update_url_language(event: gr.SelectData, current_task_language: dict, language_per_task: dict):
@@ -576,7 +580,8 @@ with gr.Blocks(css=css) as block:
576
  with gr.Tab(pretty_task_name, id=task_tab_id) as task_tab:
577
  # For updating the 'task' in the URL
578
  task_tab.select(update_url_task, [current_task_language, language_per_task], [current_task_language, language_per_task]).then(None, [current_task_language], [], js=set_window_url_params)
579
- gr.Markdown(TASK_DESCRIPTIONS[task])
 
580
  with gr.Tabs() as task_tabs:
581
  # Store the task tabs for updating them on load based on URL parameters
582
  tabs.append(task_tabs)
 
465
  def update_url_task(event: gr.SelectData, current_task_language: dict, language_per_task: dict):
466
  current_task_language["task"] = event.target.id
467
  # Either use the cached language for this task or the 1st language
468
+ try:
469
+ current_task_language["language"] = language_per_task.get(event.target.id, event.target.children[1].children[0].id)
470
+ except Exception as e: # is Overall tab, no description
471
+ current_task_language["language"] = language_per_task.get(event.target.id, event.target.children[0].children[0].id)
472
+
473
  return current_task_language, language_per_task
474
 
475
  def update_url_language(event: gr.SelectData, current_task_language: dict, language_per_task: dict):
 
580
  with gr.Tab(pretty_task_name, id=task_tab_id) as task_tab:
581
  # For updating the 'task' in the URL
582
  task_tab.select(update_url_task, [current_task_language, language_per_task], [current_task_language, language_per_task]).then(None, [current_task_language], [], js=set_window_url_params)
583
+ if "Overall" != task:
584
+ gr.Markdown(TASK_DESCRIPTIONS[task])
585
  with gr.Tabs() as task_tabs:
586
  # Store the task tabs for updating them on load based on URL parameters
587
  tabs.append(task_tabs)