https://github.com/kabirbose/ai-flashcard-generator
Program that leverages the Google Gemini API to turn PDF study notes into detailed flashcards. Uses a Node.js and Express.js backend, along with some libraries, to generate PDF documents with OCR and query them using Gemini.
https://github.com/kabirbose/ai-flashcard-generator
c-language gemini javascript nodejs pdf-ocr
Last synced: 4 days ago
JSON representation
Program that leverages the Google Gemini API to turn PDF study notes into detailed flashcards. Uses a Node.js and Express.js backend, along with some libraries, to generate PDF documents with OCR and query them using Gemini.
- Host: GitHub
- URL: https://github.com/kabirbose/ai-flashcard-generator
- Owner: KabirBose
- Created: 2024-04-24T22:08:36.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-09T21:50:44.000Z (6 months ago)
- Last Synced: 2024-11-09T22:30:40.431Z (6 months ago)
- Topics: c-language, gemini, javascript, nodejs, pdf-ocr
- Language: JavaScript
- Homepage:
- Size: 81.3 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AI Flashcard Generator
A fast, terminal application that leverages Google's Gemini AI to generate flashcards/study notes with ease. It takes a PDF file as input, uses OCR to extract the text out of the PDF file, and uses detailed prompts to generate useful flashcards.
# Setup
There are a couple things you need before using this program.
1. Node.js --> [Download it here!](https://nodejs.org/en/download)
2. Google Gemini API key --> [Get one here!](https://ai.google.dev/gemini-api/docs/api-key)
3. GhostScript (You can install it locally or globally) --> [download it here](https://ghostscript.com/releases/gpdldnld.html) or [here for Mac!](https://discussions.apple.com/thread/8584571?sortBy=best)
4. Optional: Text Editor (I recommend Visual Studio Code) --> [Download it here!](https://code.visualstudio.com/download)# Usage
1. Clone the repository --> `git clone https://github.com/KabirBose/Flashcard-Generator`
2. Enter the directory with your terminal --> `cd /YOUR/PATH/TO/flashcard-generator`
3. Install all the dependencies --> `npm i` or `npm install`
4. Add PDF files that you want to convert into flashcards into the `pdfs` folder
5. Run the program --> `npm run dev`# Screenshots
Here is an example of the input (a PDF file):
The program in process:
The output file (in Markdown language):
Preview of the output file:
# Credits
Thank you to the developers of Tesseract, GhostScript, Google Gemini, and Node-PDF-OCR.