DocuChat_2 / README.md
mckplus's picture
Update README.md
867c40c
metadata
title: DocuChat
emoji: πŸ“–
colorFrom: purple
colorTo: pink
sdk: docker
pinned: true
duplicated_from: mckplus/DocuChat

DocuChat: The LangChain-Powered PDF Analysis πŸš€

Here's how it works:

  1. Upload a PDF: Select any PDF you want to analyze.
  2. Enter Your OpenAI API Key: To leverage OpenAI's powerful language models, you'll need to provide your API key.
  3. Ask a Question: Type your question into the text box and hit "Run."
  4. Get the Answer: The system will analyze your PDF and respond with the most relevant answer.

Technical Overview

  1. PDF Loading and Parsing
  • PDF Loader: Utilizes the PyPDFLoader from LangChain to read the uploaded PDF file.
  • Document Splitter: The CharacterTextSplitter divides the PDF into manageable chunks for further processing.
  1. Embeddings and Vector Storage
  • Embeddings: The OpenAIEmbeddings class is used to transform the text into a format that can be understood by the models.
  • Vector Storage: Chroma is used to store the vectors of the documents for quick retrieval.
  1. Question Answering
  • RetrievalQA: This class, from LangChain's chains, handles the core of the question-answering process.
  • OpenAI as Language Model: The OpenAI class is utilized as the core language model for the retrieval.
  1. Interactive UI
  • Panel Library: The entire interface is built using the Panel library, making it highly interactive and user-friendly.
  • Responsive Design: The UI adapts to various screen sizes, providing a smooth experience across devices.

Built by McKenzie

This project is created and maintained by McKenzie. Contributions and feedback are always welcome! & credit to sophiamyang for the inspo & intro to panel πŸ™

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference