File size: 448 Bytes
0aeb1a2
 
 
 
 
 
 
 
 
 
 
 
 
5c0848b
088231a
0aeb1a2
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import gradio as gr
import pdfminer
from pdfminer.high_level import extract_text

def read_pdf(file):
    text = extract_text(file.name)
    return text

iface = gr.Interface(
    read_pdf,
    gr.inputs.File(label="Upload a PDF file"),
    gr.outputs.Textbox(label="Extracted text"),
    title="PDF Text Extractor",
    description="A smooth app that gets text from PDF files using pdfminer. 🧠",
    theme="ParityError/Anime"

)
iface.launch()