Favicon of Dr Doc Search

Dr Doc Search

A self-hosted PDF question-answering tool with a browser interface, OCR, and support for OpenAI or HuggingFace models. Open source under MIT.

Dr Doc Search is a self-hosted Python application for asking questions about PDF books and documents. It's for readers who want answers drawn from a particular text and a choice between OpenAI and HuggingFace models. The code is open source under the MIT license.

The application processes a PDF into a searchable index, then uses that document to answer questions. Its OCR workflow uses Tesseract and ImageMagick to extract text from page images, so it can work with scanned material. You can limit processing to a selected range of pages rather than the whole document.

You can ask questions through a local browser interface or the command line. The app stores the PDF, extracted text, page images, and search index on your machine. Windows support includes its ImageMagick integration.

Model choice affects where processing happens. The legacy OpenAI route uses cloud APIs for embeddings and answers; its old completion defaults are no longer current. The HuggingFace option runs sentence-transformer embeddings and a Transformers text-generation pipeline locally after downloading the models. This local route uses the project's older Python dependency stack. Local storage alone doesn't make the OpenAI route private: document content used in API requests goes to that service.

Dr Doc Search uses LangChain for its document question-answering workflow and HoloViz Panel for the web interface.

Similar to Dr Doc Search