Skip to content

Amine-Lamarr/Multi-PDF-CHAT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDFChat

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.

Features

  • 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.

Usage

  1. Clone the repository: git clone <repo-url>
  2. Navigate to the project folder: cd PDFChat
  3. Create a .env file and add your API_KEY for OpenAI or OpenRouter.
  4. Run the app: streamlit run app.py
  5. Upload PDFs and start chatting!

Example

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'?"

Requirements

  • streamlit
  • langchain
  • PyPDF2
  • faiss-cpu
  • sentence-transformers
  • fpdf (optional, for creating PDFs)
  • dotenv

License

MIT License. Feel free to use and modify!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages