Spaces:
Runtime error
Runtime error
Download app.py from timbosssds/PDF-text-extractor: direct link, hf CLI and curl.
- Browser
- Download file 258 Bytes
-
https://huggingface.co/spaces/timbosssds/PDF-text-extractor/resolve/main/app.py
- Command line
-
hf download hf://spaces/timbosssds/PDF-text-extractor/app.py
-
curl -L -o app.py https://huggingface.co/spaces/timbosssds/PDF-text-extractor/resolve/main/app.py
258 Bytes
| import gradio as gr | |
| import pdfminer | |
| from pdfminer.high_level import extract_text | |
| def read_pdf(file): | |
| text = pdfminer.extract_text(file) | |
| return text | |
| iface = gr.Interface( | |
| read_pdf, | |
| gr.inputs.File(), | |
| gr.outputs.Textbox() | |
| ) | |
| iface.launch() | |