Spaces:
Sleeping
Sleeping
Download utils/pdf_reader.py from nelsondiasandre/Summarize-Agent: direct link, hf CLI and curl.
- Browser
- Download file 158 Bytes
-
https://huggingface.co/spaces/nelsondiasandre/Summarize-Agent/resolve/main/utils/pdf_reader.py
- Command line
-
hf download hf://spaces/nelsondiasandre/Summarize-Agent/utils/pdf_reader.py
-
curl -L -o pdf_reader.py https://huggingface.co/spaces/nelsondiasandre/Summarize-Agent/resolve/main/utils/pdf_reader.py
158 Bytes
| import fitz | |
| def read_pdf(path): | |
| doc = fitz.open(path) | |
| text = "" | |
| for page in doc: | |
| text += page.get_text() | |
| return text |