AskPDF is one of the many applications of LLM use-cases. It allows extensive interactions with PDF files by answering the questions that users input about the uploaded PDF file.
Aside from basic prompting and LLMs, text-splitting and retrieval are essential components of AskPDF. Since PDFs usually contain long paragraphs, the text splitter allows AskPDF to process small chunks of paragraphs for analysis, while retrieval provides AskPDF with answers based on the provided PDF.
To get started with this project, you'll need to clone the repository and set up a virtual environment. This will allow you to install the required dependencies without affecting your system-wide Python installation.
git clone https://github.com/jkmathilda/gpt-AskPDF.git
cd ./gpt-AskPDF
pyenv versions
pyenv local 3.11.6
echo '.env' >> .gitignore
echo '.venv' >> .gitignore
ls -la
python -m venv .venv # create a new virtual environment
source .venv/bin/activate # Activate the virtual environment
python -V # Check a python version
pip list
pip install -r requirements.txt
pip freeze | tee requirements.txt.detail
To configure the application, there are a few properties that can be set the environment
echo 'OPENAI_API_KEY="sk-...."' >> .env
python -m streamlit run main.py
deactivate
