Spaces:
Running
Running
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:
- Upload a PDF: Select any PDF you want to analyze.
- Enter Your OpenAI API Key: To leverage OpenAI's powerful language models, you'll need to provide your API key.
- Ask a Question: Type your question into the text box and hit "Run."
- Get the Answer: The system will analyze your PDF and respond with the most relevant answer.
Technical Overview
- 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.
- 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.
- 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.
- 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