Download utils.py from kushagrasharma-13/Resume_Parser_HuggingFace: direct link, hf CLI and curl.
- Browser
- Download file 271 Bytes
-
https://huggingface.co/spaces/kushagrasharma-13/Resume_Parser_HuggingFace/resolve/main/utils.py
- Command line
-
hf download hf://spaces/kushagrasharma-13/Resume_Parser_HuggingFace/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/kushagrasharma-13/Resume_Parser_HuggingFace/resolve/main/utils.py
271 Bytes
| import PyPDF2 | |
| def extract_text_from_pdf(uploaded_file): | |
| pdf_text = "" | |
| reader = PyPDF2.PdfReader(uploaded_file) | |
| for page_num in range(len(reader.pages)): | |
| page = reader.pages[page_num] | |
| pdf_text += page.extract_text() + "\n" | |
| return pdf_text | |