Welcome to DocuChat, an AI-powered app that allows seamless interaction with PDF documents using OpenAI's GPT model. Ask questions about your PDF's content, generate intelligent responses, and copy answers—all through a simple interface! 🧠📑
- Extract Text from PDFs: Automatically extracts text from your selected PDF files.
- AI-Powered Q&A: Uses OpenAI’s GPT-3.5 to generate intelligent questions and answers based on the extracted text.
- Clipboard Integration: Easily copy answers to your clipboard with one click.
- User-Friendly Interface: Built with Streamlit, offering a clean and intuitive UI.
- Secure API Key Input: Input your OpenAI API key securely via the sidebar.
To set up DocuChat on your local machine, follow these steps:
-
Clone the repository:
git clone https://github.com/smebad/DocuChat.git cd DocuChat ```
-
Install dependencies:
Install the required packages using pip:
pip install -r requirements.txt
The requirements.txt file includes the following dependencies:
- openai==1.30.3
- PyPDF2==3.0.1
- pyperclip==1.8.2
- streamlit==1.35.0
- Run the app:
Launch the Streamlit app:
streamlit run app.py
🧑💻 Usage:
- Start the app: Once the app is running, it will open in your default web browser.
- Enter your OpenAI API Key: Input your API key in the sidebar for the app to interact with the OpenAI API.
- Select a PDF Folder: Enter the folder path where your PDF files are located.
- Choose a PDF File: Select a PDF file from the dropdown list.
- Interact with the PDF: The app will extract text from the PDF and generate a sample question. You can also ask your own question and get an AI-powered response.
- Copy Answers: Click the "Copy Answer Text" button to copy the AI-generated answer to your clipboard.