Spaces:
Sleeping
Sleeping
use skip instead of update
Browse files
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.
|
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
|
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])
|