File size: 3,007 Bytes
927e909 5e9ee55 927e909 5e9ee55 927e909 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Gradio UI – v2.1 (Leaderboard · Data Viewer · Prompt-to-Leaderboard)
"""
from __future__ import annotations
from pathlib import Path
import gradio as gr
# ---- Tab 组件 ----
from tabs.leaderboard_tab import create_leaderboard_tab
from tabs.data_viewer_tab import create_data_viewer_tab
from tabs.data_viewer_side_by_side_tab import create_data_viewer_side_by_side_tab
# ---------------------------------------------------------------------------
# UI
# ---------------------------------------------------------------------------
with gr.Blocks(title="DeepResearch Bench") as demo:
# ========= 全局 CSS(仅作用于自定义标题 & 简介) =========
gr.HTML("""
<style>
.title-block{
/* 渐变文字效果 - 改进版 */
background: linear-gradient(to right, #009CFF, #823AFF);
background: -webkit-linear-gradient(to right, #009CFF, #823AFF);
background: -moz-linear-gradient(to right, #009CFF, #823AFF);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
color: transparent;
text-align: center;
font-size: 2.1rem;
font-weight: 700;
margin: 0 0 1rem 0;
padding-bottom: 0.2rem;
display: inline-block; /* 重要:确保渐变效果正常 */
width: 100%; /* 确保居中对齐 */
}
.intro-block{
text-align:center;
margin-bottom:1.25rem;
line-height:2;
}
.intro-block a{
color:#0a58ca;
text-decoration:none;
margin:0 .3rem;
}
.intro-block a:hover{ text-decoration:underline; }
</style>
""")
# ========= 顶部标题 & 简介(不使用 Markdown 标题语法) =========
gr.HTML("""
<div class="title-block">
DeepResearch Bench: A Comprehensive Benchmark for Deep Research Agents
</div>
<div class="intro-block">
The research aims to comprehensively evaluate the capabilities of Deep Research Agents.<br>
<a href="#">Code</a> |
<a href="https://deepresearch-bench.github.io/">Website</a> |
<a href="#">Paper</a> |
<a href="#">Eval Dataset</a> |
Total models: 16 | Last Update: 28 May 2025
</div>
""")
# ========= 主 Tabs =========
with gr.Tabs():
create_leaderboard_tab() # 🏆 Leaderboard
create_data_viewer_side_by_side_tab()
create_data_viewer_tab() # 🔍 Data Viewer
with gr.Tab("💬Prompt-to-Leaderboard"):
gr.Markdown(
"""
🚧 **Prompt-to-Leaderboard** module not implemented yet.
Planned: inspect how individual prompts affect overall model ranking.
"""
)
# ---------------------------------------------------------------------------
# Entrypoint
# ---------------------------------------------------------------------------
if __name__ == "__main__":
demo.launch()
|