yangzhitao commited on
Commit
c94136a
·
1 Parent(s): 6ad8c8e

refactor: adjust parameter order in create_submit_tab function to ensure proper handling of OAuth profile and benchmark values

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -577,8 +577,8 @@ def create_submit_tab(tab_id: int, demo: gr.Blocks):
577
  model_type: str,
578
  json_str: str,
579
  commit_message: str,
580
- *benchmark_values,
581
  oauth_profile: gr.OAuthProfile | None = None,
 
582
  ):
583
  """Submit with either form data or JSON"""
584
  import json
@@ -673,8 +673,9 @@ def create_submit_tab(tab_id: int, demo: gr.Blocks):
673
  model_type,
674
  json_str,
675
  commit_textbox,
 
676
  ]
677
- # Add benchmark form inputs
678
  for _, checkbox, result_input in benchmark_results_form:
679
  all_inputs.extend([checkbox, result_input])
680
 
 
577
  model_type: str,
578
  json_str: str,
579
  commit_message: str,
 
580
  oauth_profile: gr.OAuthProfile | None = None,
581
+ *benchmark_values,
582
  ):
583
  """Submit with either form data or JSON"""
584
  import json
 
673
  model_type,
674
  json_str,
675
  commit_textbox,
676
+ login_button, # oauth_profile must be before *benchmark_values
677
  ]
678
+ # Add benchmark form inputs (these will be captured by *benchmark_values)
679
  for _, checkbox, result_input in benchmark_results_form:
680
  all_inputs.extend([checkbox, result_input])
681