diff --git a/gradio_ui.py b/gradio_ui.py index 9182cb7..da2cc4f 100644 --- a/gradio_ui.py +++ b/gradio_ui.py @@ -129,6 +129,12 @@ def toggle_run( is_running ): global should_stop # ✅ 加上这一行 + + # 🛑 判空逻辑:输入源 + 输出形式 至少一个 + if not inputs and not output_choices: + msg = "[❌ 请选择至少一个输入源或输出形式]" + return msg, False, gr.update(value="Run Evaluation") + if not is_running: should_stop = False yield from run_eval(