PDFChat is a Streamlit-based AI chatbot that allows you to upload multiple PDF files and ask questions about their content. It uses LangChain, HuggingFace embeddings, and OpenAI models to process, embed, and retrieve answers from your documents.
- Upload one or more PDF files.
- Extracts text from PDFs and splits it into chunks.
- Embeds the text using HuggingFace sentence-transformers.
- Creates a conversational AI that answers your questions based on the uploaded PDFs.
- Supports conversation memory to keep chat context.
- create a streamlit interface.
- Clone the repository:
git clone <repo-url> - Navigate to the project folder:
cd PDFChat - Create a
.envfile and add yourAPI_KEYfor OpenAI or OpenRouter. - Run the app:
streamlit run app.py - Upload PDFs and start chatting!
Upload a PDF about "Eminem" and one about "USA", then ask questions like:
- "What is this PDF about?"
- "Tell me about America's capital."
- "Who won an Academy Award for 'Lose Yourself'?"
- streamlit
- langchain
- PyPDF2
- faiss-cpu
- sentence-transformers
- fpdf (optional, for creating PDFs)
- dotenv
MIT License. Feel free to use and modify!