This commit is contained in:
hailin 2025-07-08 09:53:46 +08:00
parent 3a377925b1
commit 35c0f5b345
1 changed files with 19 additions and 17 deletions

View File

@ -1,7 +1,6 @@
import gradio as gr
def run_eval(inputs, native, other, outputs):
# 模拟输出,实际应拼接指令后调用 subprocess.run 或远程 API
result = (
f"\n[Eval Started]\n"
f"Inputs: {inputs}\n"
@ -15,9 +14,9 @@ def run_eval(inputs, native, other, outputs):
with gr.Blocks(title="EvalScope 全功能界面") as demo:
gr.Markdown("## EvalScope 功能选择平台")
with gr.Row():
with gr.Column():
gr.Markdown("### INPUT 输入区")
with gr.Group():
gr.Markdown("### INPUT 输入区")
with gr.Row():
input_choices = gr.CheckboxGroup(
label="选择输入源",
choices=["API Models", "Local Models", "Benchmarks", "Custom Datasets"]
@ -25,22 +24,24 @@ with gr.Blocks(title="EvalScope 全功能界面") as demo:
with gr.Row():
with gr.Column():
gr.Markdown("### NATIVE 本地功能区")
native_choices = gr.CheckboxGroup(
label="启用本地模块",
choices=["Model Adapter", "Data Adapter", "Evaluator", "Perf Monitor"]
)
with gr.Group():
gr.Markdown("### NATIVE 本地功能区")
native_choices = gr.CheckboxGroup(
label="启用本地模块",
choices=["Model Adapter", "Data Adapter", "Evaluator", "Perf Monitor"]
)
with gr.Column():
gr.Markdown("### OTHER 其他功能区")
other_choices = gr.CheckboxGroup(
label="启用外部后端",
choices=["OpenCompass", "VLMEvalKit", "RAGAS", "MTEB/CMTEB"]
)
with gr.Group():
gr.Markdown("### OTHER 其他功能区")
other_choices = gr.CheckboxGroup(
label="启用外部后端",
choices=["OpenCompass", "VLMEvalKit", "RAGAS", "MTEB/CMTEB"]
)
with gr.Row():
with gr.Column():
gr.Markdown("### OUTPUT 输出区")
with gr.Group():
gr.Markdown("### OUTPUT 输出区")
with gr.Row():
output_choices = gr.CheckboxGroup(
label="输出形式",
choices=["Evaluation Report", "Gradio", "WandB", "Swanlab"]
@ -53,3 +54,4 @@ with gr.Blocks(title="EvalScope 全功能界面") as demo:
if __name__ == '__main__':
demo.launch(server_name="0.0.0.0", server_port=7900)