This commit is contained in:
parent
b42fec3418
commit
d0f499bb1c
19
gradio_ui.py
19
gradio_ui.py
|
|
@ -227,15 +227,30 @@ def toggle_run(
|
|||
if not is_running:
|
||||
should_stop = False
|
||||
if run_mode == "perf":
|
||||
yield from run_perf(...)
|
||||
yield from run_perf(
|
||||
inputs, native, other, output_choices,
|
||||
api_url, api_token,
|
||||
api_provider, dataset,
|
||||
max_tokens, min_tokens, parallel_reqs,
|
||||
max_prompt_len, num_requests,
|
||||
model_override
|
||||
)
|
||||
elif run_mode == "eval":
|
||||
yield from run_eval_tool(...)
|
||||
yield from run_eval_tool(
|
||||
inputs, native, other, output_choices,
|
||||
api_url, api_token,
|
||||
api_provider, dataset,
|
||||
max_tokens, min_tokens, parallel_reqs,
|
||||
max_prompt_len, num_requests,
|
||||
model_override
|
||||
)
|
||||
elif run_mode == "app":
|
||||
yield "[⚠️ 当前为 app 模式,请手动打开 http://localhost:7901 查看报告]", False, gr.update(value="Run Evaluation")
|
||||
else:
|
||||
msg = stop_eval()
|
||||
yield msg, False, gr.update(value="Run Evaluation")
|
||||
|
||||
|
||||
# ---------------- 输入源互斥逻辑 ----------------
|
||||
def enforce_input_exclusive_and_toggle_fields(selected):
|
||||
order = ["API Models", "Local Models", "Benchmarks", "Custom Datasets"]
|
||||
|
|
|
|||
Loading…
Reference in New Issue