mirror of
https://github.com/opendatalab/MinerU.git
synced 2026-03-27 11:08:32 +07:00
Merge pull request #597 from myhloli/gradio-add-examples
feat(gradio_app): add examples accordion to the PDF conversion interface
This commit is contained in:
@@ -150,6 +150,13 @@ if __name__ == "__main__":
|
||||
change_bu = gr.Button("Convert")
|
||||
clear_bu = gr.ClearButton([pdf_show], value="Clear")
|
||||
pdf_show = PDF(label="Please upload pdf", interactive=True, height=800)
|
||||
with gr.Accordion("Examples:"):
|
||||
example_root = os.path.join(os.path.dirname(__file__), "examples")
|
||||
gr.Examples(
|
||||
examples=[os.path.join(example_root, _) for _ in os.listdir(example_root) if
|
||||
_.endswith("pdf")],
|
||||
inputs=pdf_show,
|
||||
)
|
||||
|
||||
with gr.Column(variant='panel', scale=5):
|
||||
output_file = gr.File(label="convert result", interactive=False)
|
||||
|
||||
BIN
projects/gradio_app/examples/academic_paper_formula.pdf
Executable file
BIN
projects/gradio_app/examples/academic_paper_formula.pdf
Executable file
Binary file not shown.
BIN
projects/gradio_app/examples/academic_paper_img_formula.pdf
Executable file
BIN
projects/gradio_app/examples/academic_paper_img_formula.pdf
Executable file
Binary file not shown.
BIN
projects/gradio_app/examples/garbled_formula.pdf
Executable file
BIN
projects/gradio_app/examples/garbled_formula.pdf
Executable file
Binary file not shown.
BIN
projects/gradio_app/examples/garbled_formula2.pdf
Executable file
BIN
projects/gradio_app/examples/garbled_formula2.pdf
Executable file
Binary file not shown.
BIN
projects/gradio_app/examples/garbled_img_formula.pdf
Executable file
BIN
projects/gradio_app/examples/garbled_img_formula.pdf
Executable file
Binary file not shown.
BIN
projects/gradio_app/examples/scanned.pdf
Executable file
BIN
projects/gradio_app/examples/scanned.pdf
Executable file
Binary file not shown.
Reference in New Issue
Block a user