mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-24 10:54:04 +08:00
c1df2f818c
* format * add changeset * add changeset * Update component * Add tests * Add code --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
13 lines
314 B
Python
13 lines
314 B
Python
import gradio as gr
|
|
from gradio_pdf import PDF
|
|
from pathlib import Path
|
|
|
|
current_dir = Path(__file__).parent
|
|
|
|
demo = gr.Interface(lambda x: x,
|
|
PDF(),
|
|
gr.File(),
|
|
examples=[[str(current_dir / "contract.pdf")]])
|
|
|
|
if __name__ == "__main__":
|
|
demo.launch() |