Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chat with PDF

A Streamlit application that allows you to chat with your PDF documents using Langchain, OpenAI, and FAISS.

Features

  • Upload multiple PDF files.
  • Extract text from PDFs.
  • Chunk text for efficient processing.
  • Create vector embeddings using Hugging Face Instructor models.
  • Store embeddings in a FAISS vector store.
  • Engage in a conversational chat interface powered by Langchain and OpenAI to ask questions about the PDF content.

Requirements

All required Python packages are listed in requirements.txt.

pip install -r requirements.txt

Setup

  1. Environment Variables:
    • This project requires an OpenAI API key.
    • Rename .env.example to .env.
    • Add your OpenAI API key to the .env file:
      OPENAI_API_KEY=your_openai_api_key_here
      HUGGINGFACEHUB_API_TOKEN=your_huggingface_token_here
      
    • You will also need a Hugging Face Hub API token for downloading the embedding model. You can obtain one from the Hugging Face website.

Usage

  1. Ensure you have installed the requirements and set up the .env file.

  2. Run the Streamlit application:

    streamlit run app.py
  3. Open your web browser and navigate to the local URL provided by Streamlit (usually http://localhost:8501).

  4. Use the sidebar to upload your PDF files.

  5. Click the "Process" button to index the documents.

  6. Once processing is complete, ask questions about your documents in the chat input field.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages