A PDF Question-Answering application that lets you upload any PDF and chat with its content using AI-powered retrieval and language models. Powered by Streamlit for an intuitive UI.
Report Bug
.
Request Feature
AskMyPDF enables you to:
- Upload any PDF and instantly chat with its content.
- Conversational Q&A powered by Anthropic Claude via LangChain.
- Semantic search using FAISS and Sentence Transformers.
- Source highlighting: See exactly where answers come from in your PDF.
- Modern Streamlit UI with chat history and source expansion.
It's designed for students, researchers, and professionals who want to interactively analyze and extract knowledge from PDF documents.
This tech stack powers the dynamic chat interface and retrieval-augmented Q&A in the project. Streamlit and st-chat provide an intuitive chat UI, while LangChain, FAISS, and Sentence Transformers handle the AI and search logic.
To get a local copy up and running, follow these simple steps.
- Python 3.10+
- Poetry (recommended for managing dependencies)
- Anthropic API Key (for Claude)
- Clone the repo
git clone https://github.com/Yousinator/AskMyPDF
cd AskMyPDF-
Install Poetry (if you haven’t)
curl -sSL https://install.python-poetry.org | python3 - -
Install Dependencies
poetry install
-
Activate the Virtual Environment
poetry shell
-
Set Environment Variables
ANTHROPIC_API_KEY(required)CLAUDE_MODEL(e.g.,claude-sonnet-4-20250514)EMBED_MODEL_NAME(e.g.,all-MiniLM-L6-v2)
You can set these in your shell or in a
.envfile. -
Run the App
poetry run streamlit run src/main.py
- Launch the app using
poetry run streamlit run src/main.py. - Upload a PDF using the file uploader.
- Ask any question about the document in the chat box.
- View answers and expand to see the exact PDF source chunks.
- Chat history is maintained for your session.
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- If you have suggestions for improvements or new features, feel free to open an issue to discuss it, or directly create a pull request after you edit the README.md file with necessary changes.
- Please make sure you check your spelling and grammar.
- Create individual PR for each suggestion.
- Please also read through the Code Of Conduct before posting your first idea as well.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the Apache 2.0 License. See LICENSE for more information.
- Yousinator - Yousinator
Made with ❤️ by Yousinator