This commit is contained in:
parent
3a377925b1
commit
35c0f5b345
12
gradio_ui.py
12
gradio_ui.py
|
|
@ -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():
|
||||
with gr.Group():
|
||||
gr.Markdown("### INPUT 输入区")
|
||||
with gr.Row():
|
||||
input_choices = gr.CheckboxGroup(
|
||||
label="选择输入源",
|
||||
choices=["API Models", "Local Models", "Benchmarks", "Custom Datasets"]
|
||||
|
|
@ -25,6 +24,7 @@ with gr.Blocks(title="EvalScope 全功能界面") as demo:
|
|||
|
||||
with gr.Row():
|
||||
with gr.Column():
|
||||
with gr.Group():
|
||||
gr.Markdown("### NATIVE 本地功能区")
|
||||
native_choices = gr.CheckboxGroup(
|
||||
label="启用本地模块",
|
||||
|
|
@ -32,15 +32,16 @@ with gr.Blocks(title="EvalScope 全功能界面") as demo:
|
|||
)
|
||||
|
||||
with gr.Column():
|
||||
with gr.Group():
|
||||
gr.Markdown("### OTHER 其他功能区")
|
||||
other_choices = gr.CheckboxGroup(
|
||||
label="启用外部后端",
|
||||
choices=["OpenCompass", "VLMEvalKit", "RAGAS", "MTEB/CMTEB"]
|
||||
)
|
||||
|
||||
with gr.Row():
|
||||
with gr.Column():
|
||||
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)
|
||||
|
||||
Loading…
Reference in New Issue