PDF-to-text / app.py
sblumenf's picture
Update app.py
cfb68d1
raw
history blame
258 Bytes
import gradio as gr
import pdfminer
def read_pdf(file):
from pdfminer.high_level import extract_text
text = extract_text(file.name)
return text
iface = gr.Interface(
read_pdf,
gr.inputs.File(),
gr.outputs.Textbox()
)
iface.launch()