diff --git a/projects/gradio_app/app.py b/projects/gradio_app/app.py index feb2aa42..aa576ecb 100644 --- a/projects/gradio_app/app.py +++ b/projects/gradio_app/app.py @@ -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) diff --git a/projects/gradio_app/examples/academic_paper_formula.pdf b/projects/gradio_app/examples/academic_paper_formula.pdf new file mode 100755 index 00000000..9515bdfe Binary files /dev/null and b/projects/gradio_app/examples/academic_paper_formula.pdf differ diff --git a/projects/gradio_app/examples/academic_paper_img_formula.pdf b/projects/gradio_app/examples/academic_paper_img_formula.pdf new file mode 100755 index 00000000..319cb873 Binary files /dev/null and b/projects/gradio_app/examples/academic_paper_img_formula.pdf differ diff --git a/projects/gradio_app/examples/garbled_formula.pdf b/projects/gradio_app/examples/garbled_formula.pdf new file mode 100755 index 00000000..5a4d5c6e Binary files /dev/null and b/projects/gradio_app/examples/garbled_formula.pdf differ diff --git a/projects/gradio_app/examples/garbled_formula2.pdf b/projects/gradio_app/examples/garbled_formula2.pdf new file mode 100755 index 00000000..cec3a51b Binary files /dev/null and b/projects/gradio_app/examples/garbled_formula2.pdf differ diff --git a/projects/gradio_app/examples/garbled_img_formula.pdf b/projects/gradio_app/examples/garbled_img_formula.pdf new file mode 100755 index 00000000..7f1cbf26 Binary files /dev/null and b/projects/gradio_app/examples/garbled_img_formula.pdf differ diff --git a/projects/gradio_app/examples/scanned.pdf b/projects/gradio_app/examples/scanned.pdf new file mode 100755 index 00000000..f35e53dd Binary files /dev/null and b/projects/gradio_app/examples/scanned.pdf differ