Flash Notes is an interactive document assistant that leverages Retrieval-Augmented Generation (RAG) to enhance user interaction with documents. It allows users to upload documents (PDF, PPTX, or TXT) and engage with them using Qwen 2.5. With Flash Notes, users can chat with their documents, generate summaries, and create quizzes based on the content, all designed to enhance document comprehension and learning.
- Chat with Documents: Ask questions directly about your documents and receive accurate, context-aware responses.
- Summarize Content: Generate concise summaries of key points.
- Generate Quizzes: Automatically create quizzes to test knowledge of the document content.
- RAG (Retrieval-Augmented Generation): Utilizes RAG to improve response relevance by retrieving document-specific context before generating responses.
- OCR for Image-Based Text: Extracts text from images within documents using Tesseract OCR.
- Frontend: Next.js
- Backend: FastAPI
- LLM: Qwen 2.5 for natural language processing
- RAG: Enhances the LLMโs responses with document-based retrieval
- Database: IndexDB
- Python 3.10+ for the FastAPI backend
- Node.js for the Next.js frontend
- Ollama for the LLM model deployment
- Tesseract OCR for extracting text from images within documents (download link below)
git clone https://github.com/Nawap1/FlashNotes.git
cd FlashNotes
- Download the Qwen 2.5 model from this link.
- Place the downloaded model file in a new directory named
/Model
within the project root.
- Download and install Ollama from here, following the installation instructions provided.
- Download Tesseract OCR from this link and follow the installation instructions.
- Once installed, ensure Tesseract is accessible in your systemโs PATH.
-
Copy the downloaded model file into the project directory.
-
Create a file named
Modelfile
in the same directory with the following content:FROM qwen2.5-3b-instruct-q4_k_m.gguf SYSTEM You are a helpful AI assistant # Adjust model parameters PARAMETER temperature 0.7 PARAMETER top_k 40 PARAMETER top_p 0.95 PARAMETER num_ctx 10000
-
Create the Ollama model by running:
ollama create qwen3 -f Modelfile
pip install -r requirements.txt
-
Navigate to the API directory:
cd api
-
Run the API:
python api.py
The API will now be running at
http://localhost:8000
.
-
Navigate to the app directory:
cd app
-
Install frontend dependencies:
npm install
-
Start the frontend server:
npx next dev
The app should now be accessible at
http://localhost:3000
.
- Open your browser and go to
http://localhost:3000
. - Use the Upload button to upload your documents.
- Once loaded, interact with your document in the following ways:
- Chat: Navigate to the chat section to ask questions about the document.
- Summarize: Go to the summary tab and click Generate Summary for key takeaways.
- Quiz: Go to the quiz tab and click Generate Quiz to create questions based on the document content.
- OCR for Images: If your document contains images with text, the system will use Tesseract OCR to extract and process the text.