https://github.com/yeyom/notes-to-flashcards
Convert your study guides or notes into flashcards! Using LLMs obviously haha
https://github.com/yeyom/notes-to-flashcards
ai docker docker-compose flashcards llm mistral ollama python study-guide study-notes university
Last synced: 25 days ago
JSON representation
Convert your study guides or notes into flashcards! Using LLMs obviously haha
- Host: GitHub
- URL: https://github.com/yeyom/notes-to-flashcards
- Owner: YeyoM
- License: mit
- Created: 2024-12-10T19:35:40.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-22T17:04:25.000Z (over 1 year ago)
- Last Synced: 2025-02-22T18:19:19.983Z (over 1 year ago)
- Topics: ai, docker, docker-compose, flashcards, llm, mistral, ollama, python, study-guide, study-notes, university
- Language: Python
- Homepage:
- Size: 82 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flashcard Generator
Flashcard Generator is a Python-based tool designed to create question-answer flashcards from study material. This project leverages the Ollama API to transform structured content, such as Markdown files, into comprehensive flashcards, making learning more efficient.
---
## Features
- **Ollama API Integration**: Connects to the Ollama API to generate flashcards from your content.
- **Model Management**: Automatically pulls and verifies models for processing.
- **Markdown Parsing**: Reads, cleans, and processes study guides in Markdown format.
- **Section Division**: Splits study material into manageable sections for better flashcard generation.
- **Customizable Outputs**: Generates flashcards in English or Spanish, adhering to strict formatting rules.
---
## Installation and Usage
1. Clone the repository:
```bash
git clone https://github.com/YeyoM/notes-to-flashcards.git
cd notes-to-flashcards
```
2. Place your study material in the `study_guides` directory with the name `study_guide.md`:
```plaintext
notes-to-flashcards
├── study_guides
│ └── study_guide.md
```
Note 1: The study guide should be in Markdown format.
Note 2: For better results, use headings to divide the content into sections. (e.g., `# Chapter 1: Basics`)
3. Run docker-compose:
Using docker compose, you can run the following command:
```bash
docker-compose up # or docker-compose up --build to rebuild the images
```
---
## Configuration
- **Model**: By default, the generator uses the `mistral` model. You can modify this in the `FlashcardGenerator` class.
- **Content Parsing**: Only Markdown files are currently supported. Other formats will return an empty string.
---
## Example Output
### Input
```markdown
# Chapter 1: Basics
- Python is a programming language.
- It is used for web development, data analysis, and more.
```
### Output
```plaintext
Q1:
What is Python?
A1:
Python is a programming language used for web development, data analysis, and other applications.
```
Note: You will see that before running the script, there are already some flashcards generated in the `flashcards` directory, these are some examples of the output and will be overwritten when you run the script.
---
## Contributions
Contributions are welcome! Feel free to fork the repository and submit pull requests with enhancements or bug fixes.
---
## License
This project is licensed under the [MIT License](LICENSE).