Download services/pdf_processor.py from CLMARRARA/tech_challenge_fase_4_client_frontend: direct link, hf CLI and curl.
- Browser
- Download file 188 Bytes
-
https://huggingface.co/spaces/CLMARRARA/tech_challenge_fase_4_client_frontend/resolve/main/services/pdf_processor.py
- Command line
-
hf download hf://spaces/CLMARRARA/tech_challenge_fase_4_client_frontend/services/pdf_processor.py
-
curl -L -o pdf_processor.py https://huggingface.co/spaces/CLMARRARA/tech_challenge_fase_4_client_frontend/resolve/main/services/pdf_processor.py
188 Bytes
| import PyPDF2 | |
| def extract_text_from_pdf(file): | |
| reader = PyPDF2.PdfReader(file) | |
| text = "" | |
| for page in reader.pages: | |
| text += page.extract_text() + "\n" | |
| return text |