freddyaboulton's picture
Upload folder using huggingface_hub
0f9d7e1 verified
raw
history blame contribute delete
355 Bytes
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()