Upload folder using huggingface_hub
Browse files- README.md +86 -1
- example.png +0 -0
README.md
CHANGED
|
@@ -1,8 +1,93 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
app_file: app.py
|
| 4 |
requirements: requirements.txt
|
| 5 |
python: 3.12
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 4.44.0
|
| 8 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: AnkiGen
|
| 3 |
app_file: app.py
|
| 4 |
requirements: requirements.txt
|
| 5 |
python: 3.12
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 4.44.0
|
| 8 |
---
|
| 9 |
+
|
| 10 |
+
# AnkiGen - Anki Card Generator
|
| 11 |
+
|
| 12 |
+
AnkiGen is a Gradio-based web application that generates Anki-compatible CSV files using Large Language Models (LLMs) based on user-specified subjects and preferences.
|
| 13 |
+
|
| 14 |
+

|
| 15 |
+
|
| 16 |
+
## Features
|
| 17 |
+
|
| 18 |
+
- Generate Anki cards for various subjects
|
| 19 |
+
- Customizable number of topics and cards per topic
|
| 20 |
+
- User-friendly interface powered by Gradio
|
| 21 |
+
- Exports to CSV format compatible with Anki import
|
| 22 |
+
- Utilizes LLMs for high-quality content generation
|
| 23 |
+
|
| 24 |
+
## Installation for Local Use
|
| 25 |
+
|
| 26 |
+
1. Clone this repository:
|
| 27 |
+
|
| 28 |
+
```
|
| 29 |
+
git clone https://github.com/yourusername/ankigen.git
|
| 30 |
+
cd ankigen
|
| 31 |
+
```
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
2. Install the required dependencies:
|
| 35 |
+
|
| 36 |
+
```
|
| 37 |
+
pip install -r requirements.txt
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
3. Set up your OpenAI API key (required for LLM functionality).
|
| 41 |
+
|
| 42 |
+
## Usage
|
| 43 |
+
|
| 44 |
+
1. Run the application:
|
| 45 |
+
|
| 46 |
+
```
|
| 47 |
+
gradio app.py --demo-name ankigen
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
2. Open your web browser and navigate to the provided local URL (typically `http://127.0.0.1:7860`).
|
| 51 |
+
|
| 52 |
+
3. In the application interface:
|
| 53 |
+
- Enter your OpenAI API key
|
| 54 |
+
- Specify the subject you want to create cards for
|
| 55 |
+
- Adjust the number of topics and cards per topic
|
| 56 |
+
- (Optional) Add any preference prompts
|
| 57 |
+
- Click "Generate Cards"
|
| 58 |
+
|
| 59 |
+
4. Review the generated cards in the interface.
|
| 60 |
+
|
| 61 |
+
5. Click "Export to CSV" to download the Anki-compatible file.
|
| 62 |
+
|
| 63 |
+
## CSV Format
|
| 64 |
+
|
| 65 |
+
The generated CSV file includes the following fields:
|
| 66 |
+
- Index
|
| 67 |
+
- Topic
|
| 68 |
+
- Question
|
| 69 |
+
- Answer
|
| 70 |
+
- Explanation
|
| 71 |
+
- Example
|
| 72 |
+
|
| 73 |
+
You can create a new note type in Anki with these fields to handle importing.
|
| 74 |
+
|
| 75 |
+
## Development
|
| 76 |
+
|
| 77 |
+
This project is built with:
|
| 78 |
+
- Python 3.12
|
| 79 |
+
- Gradio 4.44.0
|
| 80 |
+
|
| 81 |
+
To contribute or modify:
|
| 82 |
+
1. Make your changes in `app.py`
|
| 83 |
+
2. Update `requirements.txt` if you add new dependencies
|
| 84 |
+
3. Test thoroughly before submitting pull requests
|
| 85 |
+
|
| 86 |
+
## License
|
| 87 |
+
|
| 88 |
+
BSD 2.0
|
| 89 |
+
|
| 90 |
+
## Acknowledgments
|
| 91 |
+
|
| 92 |
+
- This project uses the Gradio library (https://gradio.app/) for the web interface
|
| 93 |
+
- Card generation is powered by OpenAI's language models
|
example.png
ADDED
|