Download app.py from HuggingAlgorithms/PDF-TextExtractor: direct link, hf CLI and curl.
- Browser
- Download file 448 Bytes
-
https://huggingface.co/spaces/HuggingAlgorithms/PDF-TextExtractor/resolve/088231a16cdb83fb2feadfceffdecb061231e072/app.py
- Command line
-
hf download hf://spaces/HuggingAlgorithms/PDF-TextExtractor@088231a16cdb83fb2feadfceffdecb061231e072/app.py
-
curl -L -o app.py https://huggingface.co/spaces/HuggingAlgorithms/PDF-TextExtractor/resolve/088231a16cdb83fb2feadfceffdecb061231e072/app.py
448 Bytes
| 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() | |