davidr70 commited on
Commit
47fda11
·
1 Parent(s): 873b70f

fix handing of run_id

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -59,7 +59,7 @@ def update_sources_list(question_option, source_finder_id, run_id: str, baseline
59
 
60
 
61
  # Main function to handle UI interactions
62
- async def update_sources_list_async(question_option, source_finder_name, run_id:str, baseline_ranker_name: str):
63
  if not question_option:
64
  return gr.skip(), gr.skip(), gr.skip(), "No question selected"
65
  logger.info("processing update")
@@ -112,7 +112,7 @@ async def update_sources_list_async(question_option, source_finder_name, run_id:
112
  # csv_data = df.to_csv(index=False)
113
 
114
  result_message = f"Found {len(source_runs)} results"
115
- return df_display, stats, run_id_options, result_message,
116
 
117
 
118
  # Add a new function to handle row selection
@@ -172,8 +172,7 @@ async def main():
172
  )
173
  with gr.Column(scale=1):
174
  run_id_dropdown = gr.Dropdown(
175
- choices=run_ids,
176
- value="1",
177
  allow_custom_value=True,
178
  label="Run id for Question and source finder",
179
  interactive=True,
 
59
 
60
 
61
  # Main function to handle UI interactions
62
+ async def update_sources_list_async(question_option, source_finder_name, run_id, baseline_ranker_name: str):
63
  if not question_option:
64
  return gr.skip(), gr.skip(), gr.skip(), "No question selected"
65
  logger.info("processing update")
 
112
  # csv_data = df.to_csv(index=False)
113
 
114
  result_message = f"Found {len(source_runs)} results"
115
+ return df_display, stats, gr.Dropdown(choices=run_id_options, value=run_id), result_message,
116
 
117
 
118
  # Add a new function to handle row selection
 
172
  )
173
  with gr.Column(scale=1):
174
  run_id_dropdown = gr.Dropdown(
175
+ choices=[],
 
176
  allow_custom_value=True,
177
  label="Run id for Question and source finder",
178
  interactive=True,