Skip to content

Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.

feat: add model and paper links to header with popover menus for improved navigation

myhloli6e6591d106ab
diff --git a/mineru/cli/gradio_app.py b/mineru/cli/gradio_app.py
index b00cd569..73e8835b 100644
--- a/mineru/cli/gradio_app.py
+++ b/mineru/cli/gradio_app.py
@@ -1309,7 +1309,12 @@ HEADER_I18N_PLACEHOLDERS = {
"{{HEADER_STARS_ALT}}": "header_stars_alt",
"{{HEADER_CODE_LINK}}": "header_code_link",
"{{HEADER_MODEL_LINK}}": "header_model_link",
+ "{{HEADER_MODEL_HUGGINGFACE_LINK}}": "header_model_huggingface_link",
+ "{{HEADER_MODEL_MODELSCOPE_LINK}}": "header_model_modelscope_link",
"{{HEADER_PAPER_LINK}}": "header_paper_link",
+ "{{HEADER_PAPER_MINERU_REPORT}}": "header_paper_mineru_report",
+ "{{HEADER_PAPER_MINERU25_REPORT}}": "header_paper_mineru25_report",
+ "{{HEADER_PAPER_MINERU25PRO_REPORT}}": "header_paper_mineru25pro_report",
"{{HEADER_HOMEPAGE_LINK}}": "header_homepage_link",
"{{HEADER_DOWNLOAD_LINK}}": "header_download_link",
}
@@ -1590,7 +1595,12 @@ def main(ctx,
"header_stars_alt": "stars",
"header_code_link": "Code",
"header_model_link": "Model",
+ "header_model_huggingface_link": "Hugging Face",
+ "header_model_modelscope_link": "ModelScope",
"header_paper_link": "Paper",
+ "header_paper_mineru_report": "MinerU · arXiv: 2409.18839",
+ "header_paper_mineru25_report": "MinerU 2.5 · arXiv: 2509.22186",
+ "header_paper_mineru25pro_report": "MinerU 2.5 Pro · arXiv: 2604.04771",
"header_homepage_link": "Homepage",
"header_download_link": "Download",
"max_pages": "Max convert pages",
@@ -1661,7 +1671,12 @@ def main(ctx,
"header_stars_alt": "GitHub 星标",
"header_code_link": "代码",
"header_model_link": "模型",
+ "header_model_huggingface_link": "Hugging Face",
+ "header_model_modelscope_link": "ModelScope",
"header_paper_link": "论文",
+ "header_paper_mineru_report": "MinerU · arXiv: 2409.18839",
+ "header_paper_mineru25_report": "MinerU 2.5 · arXiv: 2509.22186",
+ "header_paper_mineru25pro_report": "MinerU 2.5 Pro · arXiv: 2604.04771",
"header_homepage_link": "主页",
"header_download_link": "下载",
"max_pages": "最大转换页数",
diff --git a/mineru/resources/gradio_header.html b/mineru/resources/gradio_header.html
index 44fb9fd1..73ec9c21 100644
--- a/mineru/resources/gradio_header.html
+++ b/mineru/resources/gradio_header.html
@@ -23,6 +23,80 @@
.external-link:hover {
cursor: pointer !important;
}
+ .mineru-header-menu {
+ position: relative;
+ }
+ .mineru-header-trigger {
+ appearance: none;
+ background: transparent !important;
+ border: 0;
+ border-color: transparent !important;
+ font: inherit;
+ }
+ .mineru-header-trigger:hover,
+ .mineru-header-trigger:focus,
+ .mineru-header-trigger:focus-visible,
+ .mineru-header-trigger:active {
+ background: transparent !important;
+ border-color: transparent !important;
+ color: #ffffff !important;
+ outline: none !important;
+ box-shadow: none !important;
+ }
+ .mineru-header-menu::after {
+ content: "";
+ position: absolute;
+ left: 0;
+ right: 0;
+ top: 100%;
+ height: 12px;
+ }
+ .mineru-header-popover {
+ position: absolute;
+ left: 50%;
+ top: calc(100% + 10px);
+ z-index: 20;
+ width: 280px;
+ max-width: calc(100vw - 48px);
+ padding: 8px;
+ border: 1px solid rgba(255, 255, 255, 0.18);
+ border-radius: 8px;
+ background: rgba(17, 24, 39, 0.82);
+ backdrop-filter: blur(10px);
+ box-shadow: 0 12px 28px rgba(15, 23, 42, 0.28);
+ opacity: 0;
+ pointer-events: none;
+ transform: translate(-50%, 8px);
+ transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
+ visibility: hidden;
+ }
+ .mineru-model-popover {
+ width: 200px;
+ }
+ .mineru-header-menu:hover .mineru-header-popover,
+ .mineru-header-menu:focus-within .mineru-header-popover {
+ opacity: 1;
+ pointer-events: auto;
+ transform: translate(-50%, 0);
+ visibility: visible;
+ }
+ .mineru-header-popover-link {
+ display: block;
+ padding: 10px 12px;
+ border-radius: 6px;
+ color: rgba(255, 255, 255, 0.92) !important;
+ font-size: 14px;
+ line-height: 1.25;
+ text-align: left;
+ white-space: nowrap;
+ }
+ .mineru-header-popover-link:hover,
+ .mineru-header-popover-link:focus {
+ background: rgba(255, 255, 255, 0.12);
+ color: #ffffff !important;
+ outline: none;
+ text-decoration: none !important;
+ }
a {
text-decoration: none;
}
@@ -44,6 +118,14 @@
.mineru-demo-header .external-link:hover {
text-decoration: none !important;
}
+ .mineru-demo-header .mineru-header-popover,
+ .mineru-demo-header .mineru-header-popover * {
+ color: rgba(255, 255, 255, 0.92) !important;
+ }
+ .mineru-demo-header .mineru-header-popover-link:hover,
+ .mineru-demo-header .mineru-header-popover-link:focus {
+ color: #ffffff !important;
+ }
</style></head>
<body>
@@ -110,23 +192,32 @@
<span style="color: white">{{HEADER_CODE_LINK}}</span>
</a>
</span>
- <!-- Code Link. -->
- <span class="link-block">
- <a href="https://huggingface.co/opendatalab/MinerU2.5-Pro-2605-1.2B" target="_blank" class="external-link button is-normal is-rounded is-dark" style="text-decoration: none; cursor: pointer">
+ <!-- Model Links. -->
+ <span class="link-block mineru-header-menu mineru-model-menu">
+ <button type="button" class="external-link button is-normal is-rounded is-dark mineru-header-trigger mineru-model-trigger" style="text-decoration: none; cursor: pointer" aria-haspopup="true">
<span class="icon" style="margin-right: 4px">
<i class="fas fa-cube" style="color: white; margin-right: 4px"></i>
</span>
<span style="color: white">{{HEADER_MODEL_LINK}}</span>
- </a>
+ </button>
+ <span class="mineru-header-popover mineru-model-popover">
+ <a href="https://huggingface.co/opendatalab/MinerU2.5-Pro-2605-1.2B" target="_blank" class="mineru-header-popover-link mineru-model-popover-link">{{HEADER_MODEL_HUGGINGFACE_LINK}}</a>
+ <a href="https://modelscope.cn/models/OpenDataLab/MinerU2.5-Pro-2605-1.2B" target="_blank" class="mineru-header-popover-link mineru-model-popover-link">{{HEADER_MODEL_MODELSCOPE_LINK}}</a>
+ </span>
</span>
- <!-- arXiv Link. -->
- <span class="link-block">
- <a href="https://arxiv.org/abs/2604.04771" target="_blank" class="external-link button is-normal is-rounded is-dark" style="text-decoration: none; cursor: pointer">
+ <!-- arXiv Links. -->
+ <span class="link-block mineru-header-menu mineru-paper-menu">
+ <button type="button" class="external-link button is-normal is-rounded is-dark mineru-header-trigger mineru-paper-trigger" style="text-decoration: none; cursor: pointer" aria-haspopup="true">
<span class="icon" style="margin-right: 8px">
<i class="fas fa-file" style="color: white"></i>
</span>
<span style="color: white">{{HEADER_PAPER_LINK}}</span>
- </a>
+ </button>
+ <span class="mineru-header-popover mineru-paper-popover">
+ <a href="https://arxiv.org/abs/2409.18839" target="_blank" class="mineru-header-popover-link mineru-paper-popover-link">{{HEADER_PAPER_MINERU_REPORT}}</a>
+ <a href="https://arxiv.org/abs/2509.22186" target="_blank" class="mineru-header-popover-link mineru-paper-popover-link">{{HEADER_PAPER_MINERU25_REPORT}}</a>
+ <a href="https://arxiv.org/abs/2604.04771" target="_blank" class="mineru-header-popover-link mineru-paper-popover-link">{{HEADER_PAPER_MINERU25PRO_REPORT}}</a>
+ </span>
</span>
<!-- Homepage Link. -->