davidr70 commited on
Commit
5815d18
·
1 Parent(s): 543bed3

use skip instead of update

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -50,7 +50,7 @@ def update_sources_list(question_option, source_finder_id, baseline_ranker_id: s
50
  global previous_run_id
51
  if evt and evt.target and evt.target.elem_id == "run_id_dropdown":
52
  if run_id == previous_run_id:
53
- return gr.update(), gr.update(), gr.update(), gr.update()
54
  # Store the current run_id for future comparison
55
  previous_run_id = run_id
56
  return asyncio.run(update_sources_list_async(question_option, source_finder_id, baseline_ranker_id, run_id))
@@ -59,7 +59,7 @@ def update_sources_list(question_option, source_finder_id, baseline_ranker_id: s
59
  # Main function to handle UI interactions
60
  async def update_sources_list_async(question_option, source_finder_id, baseline_ranker_id: str, run_id: str):
61
  if not question_option:
62
- return gr.update(), gr.update(), gr.update(), "No question selected"
63
 
64
  # Extract question ID from selection
65
  question_id = int(question_option.split(":")[0])
 
50
  global previous_run_id
51
  if evt and evt.target and evt.target.elem_id == "run_id_dropdown":
52
  if run_id == previous_run_id:
53
+ return gr.skip(), gr.skip(), gr.skip(), gr.skip()
54
  # Store the current run_id for future comparison
55
  previous_run_id = run_id
56
  return asyncio.run(update_sources_list_async(question_option, source_finder_id, baseline_ranker_id, run_id))
 
59
  # Main function to handle UI interactions
60
  async def update_sources_list_async(question_option, source_finder_id, baseline_ranker_id: str, run_id: str):
61
  if not question_option:
62
+ return gr.skip(), gr.skip(), gr.skip(), "No question selected"
63
 
64
  # Extract question ID from selection
65
  question_id = int(question_option.split(":")[0])