File size: 355 Bytes
f7f8926 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
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")]],
api_name="predict")
if __name__ == "__main__":
demo.launch()
|