Run the Finished App
Exit
Run the Finished App
Execute app.py against a PDF and see the answer in your terminal
💻
Writing code and entering commands is only available on desktop. Open this page on a larger screen to complete this chapter.
Running your app
Pass two arguments to app.py:
- The path to any PDF on your computer
- Your question, in quotes
python app.py invoice.pdf "What is the total amount due?"On the first run, the app embeds all chunks and saves them to invoice.pdf.cache.json. On every subsequent run, it loads from that file — no API calls, no waiting.
Instructions
Run the following command in your terminal from inside the pdf-rag folder.
- Run
app.pywithinvoice.pdfand a question as arguments.
Interactive Code Editor
Sign in to write and run code, track your progress, and unlock all chapters.
Sign In to Start Coding