Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Improve LEARN.md structure and content #25

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .refactory.tags.cache.v3/cache.db
Binary file not shown.
Binary file added .refactory.tags.cache.v3/cache.db-shm
Binary file not shown.
Binary file added .refactory.tags.cache.v3/cache.db-wal
Binary file not shown.
126 changes: 106 additions & 20 deletions LEARN.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,115 @@
# Talk to PDF 🤖 📑️

This is the README file for the "Talk to PDF" code. The code is written in Python and uses the Streamlit library to create an interactive web application. The application allows users to ask questions about the content of a PDF file using natural language and receive instant answers powered by an AI question-answering system.
[![Python 3.11](https://img.shields.io/badge/python-3.11-blue.svg)](https://www.python.org/downloads/release/python-3110/)
[![Streamlit](https://img.shields.io/badge/Streamlit-1.38.0-FF4B4B.svg)](https://streamlit.io)
[![OpenAI](https://img.shields.io/badge/OpenAI-1.43.0-412991.svg)](https://openai.com)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Usage
An intelligent document interaction system that enables natural language conversations with PDF documents using state-of-the-art AI technology. Ask questions about your PDFs and receive instant, context-aware responses powered by OpenAI's language models.

1. **Step 1: Enter your OpenAI API key**
- Open the application and find the "Step 1: Enter your OpenAI API key" section.
- Obtain an OpenAI API key from the OpenAI platform if you don't have one.
- Enter your API key in the text input field.
- Click the "Submit" button to set the OpenAI API key.
## 🌟 Features

2. **Step 2: Upload your PDF**
- In the "Step 2: Upload your PDF" section, click the "Browse Files" button.
- Select a PDF file from your device to upload.
- Wait for the PDF to finish uploading.
- Natural language interaction with PDF documents
- Context-aware responses using advanced AI models
- Support for multiple PDF documents
- Real-time response streaming
- User-friendly chat interface
- Customizable AI model parameters
- Secure API key management

3. **Ask a question**
- Once the PDF is uploaded, you will see an input box labeled "Ask a question."
- Enter your question about the PDF content in the input box.
## 🚀 Quick Start

4. **Get the answer**
- Click the "Ask" button to submit your question.
- The application will use the uploaded PDF and the question to generate a response using the AI question-answering system.
- The response will be displayed on the screen.
### Prerequisites

Feel free to reach out to the author, [@Obelisk_1531](https://twitter.com/Obelisk_1531), for any questions or feedback.
- Python 3.11 or higher
- OpenAI API key ([Get one here](https://platform.openai.com/account/api-keys))
- pip (Python package installer)

Enjoy interacting with your PDFs using natural language! 🚀📄
### Installation

1. Clone the repository:
```bash
git clone https://github.com/yourusername/talk-to-pdf.git
cd talk-to-pdf
```

2. Install required packages:
```bash
pip install -r requirements.txt
```

3. Launch the application:
```bash
streamlit run 0_🔌API_KEY.py
```

## 📖 Usage Guide

### 1. API Key Setup
- Launch the application and navigate to the API key setup page
- Enter your OpenAI API key in the secure input field
- Click "Submit" to save your API key

### 2. Document Upload
- Navigate to the PDF upload section
- Click "Browse Files" or drag and drop your PDF(s)
- Wait for the document processing to complete

### 3. Interactive Chat
- Type your questions about the document content
- Receive AI-powered responses based on the document context
- Enjoy natural conversation flow with context awareness

### 4. Customization Options
- Select between different OpenAI models (GPT-3.5-turbo or GPT-4)
- Adjust temperature settings for response variation
- Configure other parameters as needed

## 🛠️ Technical Details

### Architecture
- Built on Streamlit for rapid web application development
- Uses LlamaIndex for efficient document processing
- Integrates OpenAI's language models for natural language understanding
- Implements vector storage for quick document retrieval

### Key Components
- Document Processing Engine
- Vector Store Implementation
- Context-Aware Chat System
- Real-Time Response Streaming
- Session State Management

## 🤝 Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues for improvements.

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

## 📝 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## 👥 Support

For support, questions, or feedback:
- Create an issue in the repository
- Contact the author [@holy_kau](https://twitter.com/holy_kau)
- Visit our [documentation](https://github.com/yourusername/talk-to-pdf/wiki)

## ⭐ Acknowledgments

- OpenAI for providing the powerful language models
- Streamlit team for the excellent web framework
- LlamaIndex team for document processing capabilities
- All contributors and users of this project

---

Made with ❤️ by [Kaushal](https://twitter.com/holy_kau)

Enjoy interacting with your PDFs using natural language! 🚀📄
Loading