davidr70 commited on
Commit
ea99c1c
·
1 Parent(s): aae6306

set default run_id to 1

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -20,7 +20,7 @@ baseline_ranker_options = []
20
  run_ids = []
21
  finder_options = []
22
  finder_labels = {"All": "All Source Finders"}
23
- previous_run_id = None
24
 
25
  run_id_dropdown = None
26
 
@@ -56,7 +56,8 @@ def update_sources_list(question_option, source_finder_id, run_id: str, baseline
56
  if evt.target.elem_id == "run_id_dropdown" and (type(run_id) == list or run_id == previous_run_id):
57
  return gr.skip(), gr.skip(), gr.skip(), gr.skip()
58
 
59
- previous_run_id = run_id
 
60
  return asyncio.run(update_sources_list_async(question_option, source_finder_id, run_id, baseline_ranker_id))
61
 
62
 
@@ -222,5 +223,4 @@ async def main():
222
 
223
 
224
  if __name__ == "__main__":
225
- logging.basicConfig(level=logging.INFO)
226
  asyncio.run(main())
 
20
  run_ids = []
21
  finder_options = []
22
  finder_labels = {"All": "All Source Finders"}
23
+ previous_run_id = 1
24
 
25
  run_id_dropdown = None
26
 
 
56
  if evt.target.elem_id == "run_id_dropdown" and (type(run_id) == list or run_id == previous_run_id):
57
  return gr.skip(), gr.skip(), gr.skip(), gr.skip()
58
 
59
+ if type(run_id) == str:
60
+ previous_run_id = run_id
61
  return asyncio.run(update_sources_list_async(question_option, source_finder_id, run_id, baseline_ranker_id))
62
 
63
 
 
223
 
224
 
225
  if __name__ == "__main__":
 
226
  asyncio.run(main())