PDF Study Assistant is a powerful, interactive tool that combines PDF viewing capabilities with AI-powered analysis, web search functionality, and advanced text recognition features. It's designed to enhance your study experience by providing intelligent assistance and easy access to information.
-
PDF Viewing and Navigation
- Load PDFs by clicking the "Browse PDF" button or dragging and dropping files
- Navigate through pages using "Previous Page" and "Next Page" buttons
- Smooth scrolling and zooming capabilities
-
Text Selection and Copying
- Select text from PDFs using a blue rectangle selection tool
- Copy selected text to clipboard automatically
- Works with both text-based and image-based (scanned) PDFs
-
Optical Character Recognition (OCR)
- Extract text from images and scanned documents within PDFs
- Recognize and copy text from photographs or handwritten notes
-
AI-Powered Analysis
- Highlight text and submit it for AI analysis
- Submit entire PDF pages for comprehensive AI review
- Interact with an AI assistant for explanations, summaries, and insights
-
Web Search Integration
- Perform web searches directly from the application
- AI can initiate searches based on context and provide summarized results
-
LaTeX Equation Recognition
- Convert images of mathematical equations to LaTeX expressions
- Render LaTeX equations as images in the chat history
-
Customizable Interface
- Toggle the AI chat panel visibility
- Adjust font settings for the chat history
-
Clone the repository:
git clone https://github.com/your-username/pdf-study-assistant.git cd pdf-study-assistant
-
Create and activate a virtual environment:
python -m venv environ source environ/bin/activate # On Windows, use: environ\Scripts\activate
-
Install the required dependencies:
pip install -r requirements.txt
-
Install Tesseract OCR:
- Windows: Download and install from Tesseract GitHub
- macOS:
brew install tesseract
- Linux:
sudo apt-get install tesseract-ocr
-
Set up environment variables: Create a
.env
file in the project root and add your API keys:OPENROUTER_API_KEY=your_openrouter_api_key SERPAPI_API_KEY=your_serpapi_api_key
-
Run the application:
python main.py
-
Loading a PDF
- Click "Browse PDF" or drag and drop a PDF file onto the application window
-
Text Selection and Copying
- Click and drag to create a blue rectangle over the desired text
- Text is automatically copied to clipboard upon release
-
Highlighting for AI Analysis
- Click the "Highlight" button to enter highlight mode
- Create an orange highlight over text or equations
- Click "Submit Highlighted Text" to send for AI analysis
-
Chatting with AI
- Type messages in the input field at the bottom of the AI panel
- Use "/chat" command for general queries:
/chat Explain the concept of quantum entanglement
- Use "/search" command for web searches:
/search Latest advancements in renewable energy
-
Submitting PDF Content
- Click "Submit PDF to AI" to analyze the current page and last two pages
-
LaTeX Equation Recognition
- Highlight an equation image and submit it for analysis
- The AI will attempt to convert it to a LaTeX expression
-
OCR for Scanned Documents
- Select text from scanned or image-based PDFs as you would with regular PDFs
- The application will automatically use OCR to extract the text
- Ensure good lighting and image quality when working with scanned documents
- For equation recognition, try to highlight only the equation, minimizing surrounding text
- Use specific queries when interacting with the AI for more accurate responses
- If OCR is not working, ensure Tesseract is properly installed and in your system PATH
- For LaTeX rendering issues, make sure you have a LaTeX distribution installed on your system
Contributions are welcome! Please feel free to submit a Pull Request.
Hotmail.com. I'm going to show you how to do that. I'm going to show you.