aaron1141 commited on
Commit
f548701
·
1 Parent(s): 8675864

feat: add example PDFs via LFS and gr.Examples in UI

Browse files
.gitattributes ADDED
@@ -0,0 +1 @@
 
 
1
+ examples/VQA/*.pdf filter=lfs diff=lfs merge=lfs -text
app.py CHANGED
@@ -213,6 +213,32 @@ with gr.Blocks(title="DataFlow-VQA · PDF 提取 Demo", theme=gr.themes.Soft())
213
  | **MinerU API Key** | 解析 PDF 版面(与 LLM 完全独立) | [mineru.net/apiManage/token](https://mineru.net/apiManage/token) |
214
  """)
215
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
216
  run_btn.click(
217
  fn=run_vqa_extraction,
218
  inputs=[pdf_files, task_name, api_url, llm_api_key, mineru_api_key, model_name, max_workers],
 
213
  | **MinerU API Key** | 解析 PDF 版面(与 LLM 完全独立) | [mineru.net/apiManage/token](https://mineru.net/apiManage/token) |
214
  """)
215
 
216
+ gr.Markdown("### 📋 示例文件(点击加载后再填入 API Key 运行)")
217
+ gr.Examples(
218
+ label="内置示例 PDF",
219
+ examples=[
220
+ [
221
+ ["examples/VQA/questionextract_test.pdf"],
222
+ "test_single",
223
+ "https://generativelanguage.googleapis.com/v1beta/openai/",
224
+ "",
225
+ "",
226
+ "gemini-2.5-pro",
227
+ 5,
228
+ ],
229
+ [
230
+ ["examples/VQA/math_question.pdf", "examples/VQA/math_answer.pdf"],
231
+ "math_split",
232
+ "https://generativelanguage.googleapis.com/v1beta/openai/",
233
+ "",
234
+ "",
235
+ "gemini-2.5-pro",
236
+ 5,
237
+ ],
238
+ ],
239
+ inputs=[pdf_files, task_name, api_url, llm_api_key, mineru_api_key, model_name, max_workers],
240
+ )
241
+
242
  run_btn.click(
243
  fn=run_vqa_extraction,
244
  inputs=[pdf_files, task_name, api_url, llm_api_key, mineru_api_key, model_name, max_workers],
examples/VQA/math_answer.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e0d15cde9173b113ada95f273dc46e14a5a18f0129c2ab7c063f2a425cdb29ca
3
+ size 62008
examples/VQA/math_question.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4f8b62f332fbd67dffb6e30b1d4204711de1f62fa0949f807a15a9ca97a93f6a
3
+ size 75286
examples/VQA/questionextract_test.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:275bc7c50e14667df4cee5386ff9ff1ea5ade3729c11568feca93b9557b49592
3
+ size 88256