utils / app.py
not-lain's picture
Update app.py
d08c253 verified
raw
history blame
292 Bytes
import gradio as gr
from pdf2image import convert_from_path
def process(file) :
images = convert_from_path(file)
return images
pdf_to_img = gr.Interface(process,gr.File(),gr.Gallery(),api_name="pdf_to_img")
demo = gr.TabbedInterface([pdf_to_img],["pdf_to_img"])
demo.launch(debug=True)