Upload folder using huggingface_hub
Browse files
README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
---
|
2 |
title: AnkiGen
|
|
|
3 |
app_file: app.py
|
4 |
requirements: requirements.txt
|
5 |
python: 3.12
|
@@ -11,8 +12,6 @@ sdk_version: 4.44.0
|
|
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 |
-
![AnkiGen Screenshot](example.png)
|
15 |
-
|
16 |
## Features
|
17 |
|
18 |
- Generate Anki cards for various subjects
|
@@ -21,12 +20,22 @@ AnkiGen is a Gradio-based web application that generates Anki-compatible CSV fil
|
|
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/
|
30 |
cd ankigen
|
31 |
```
|
32 |
|
|
|
1 |
---
|
2 |
title: AnkiGen
|
3 |
+
emoji: π
|
4 |
app_file: app.py
|
5 |
requirements: requirements.txt
|
6 |
python: 3.12
|
|
|
12 |
|
13 |
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.
|
14 |
|
|
|
|
|
15 |
## Features
|
16 |
|
17 |
- Generate Anki cards for various subjects
|
|
|
20 |
- Exports to CSV format compatible with Anki import
|
21 |
- Utilizes LLMs for high-quality content generation
|
22 |
|
23 |
+
## TODO
|
24 |
+
|
25 |
+
- [ ] model dropdown - uses gpt4o-mini by default
|
26 |
+
- [ ] cloze (checkbox?)
|
27 |
+
|
28 |
+
## Screenshot
|
29 |
+
|
30 |
+
![AnkiGen Screenshot](example.png)
|
31 |
+
|
32 |
+
|
33 |
## Installation for Local Use
|
34 |
|
35 |
1. Clone this repository:
|
36 |
|
37 |
```
|
38 |
+
git clone https://github.com/brickfrog/ankigen.git
|
39 |
cd ankigen
|
40 |
```
|
41 |
|
app.py
CHANGED
@@ -168,7 +168,7 @@ def generate_cards(
|
|
168 |
total_cards = len(card_list.cards)
|
169 |
# Calculate the number of digits needed for padding
|
170 |
padding = len(str(total_cards))
|
171 |
-
|
172 |
for card_index, card in enumerate(card_list.cards, start=1):
|
173 |
# Format the index with zero-padding
|
174 |
index = f"{card_list_index}.{card_index:0{padding}}"
|
@@ -201,11 +201,7 @@ with gr.Blocks(
|
|
201 |
gr.themes.Soft(), title="AnkiGen", css="footer{display:none !important}"
|
202 |
) as ankigen:
|
203 |
gr.Markdown("# π AnkiGen - Anki Card Generator")
|
204 |
-
gr.Markdown(
|
205 |
-
"""
|
206 |
-
#### Generate an Anki comptible .csv using LLMs based on your subject and preferences.
|
207 |
-
"""
|
208 |
-
)
|
209 |
|
210 |
with gr.Row():
|
211 |
with gr.Column(scale=1):
|
@@ -228,7 +224,8 @@ with gr.Blocks(
|
|
228 |
)
|
229 |
preference_prompt = gr.Textbox(
|
230 |
label="Preference Prompt",
|
231 |
-
placeholder=
|
|
|
232 |
)
|
233 |
generate_button = gr.Button("Generate Cards")
|
234 |
with gr.Column(scale=2):
|
@@ -238,7 +235,8 @@ with gr.Blocks(
|
|
238 |
Subject to change: currently exports a .csv with the following fields, you can
|
239 |
create a new note type with these fields to handle importing.:
|
240 |
<b>Index, Topic, Question, Answer, Explanation, Example</b>
|
241 |
-
"""
|
|
|
242 |
output = gr.Dataframe(
|
243 |
headers=[
|
244 |
"Index",
|
|
|
168 |
total_cards = len(card_list.cards)
|
169 |
# Calculate the number of digits needed for padding
|
170 |
padding = len(str(total_cards))
|
171 |
+
|
172 |
for card_index, card in enumerate(card_list.cards, start=1):
|
173 |
# Format the index with zero-padding
|
174 |
index = f"{card_list_index}.{card_index:0{padding}}"
|
|
|
201 |
gr.themes.Soft(), title="AnkiGen", css="footer{display:none !important}"
|
202 |
) as ankigen:
|
203 |
gr.Markdown("# π AnkiGen - Anki Card Generator")
|
204 |
+
gr.Markdown("#### Generate an LLM generated Anki comptible csv based on your subject and preferences.") #noqa
|
|
|
|
|
|
|
|
|
205 |
|
206 |
with gr.Row():
|
207 |
with gr.Column(scale=1):
|
|
|
224 |
)
|
225 |
preference_prompt = gr.Textbox(
|
226 |
label="Preference Prompt",
|
227 |
+
placeholder=
|
228 |
+
"""Any preferences? For example: Learning level, e.g., "Assume I'm a beginner" or "Target an advanced audience" Content scope, e.g., "Only cover up until subqueries in SQL" or "Focus on organic chemistry basics""", #noqa
|
229 |
)
|
230 |
generate_button = gr.Button("Generate Cards")
|
231 |
with gr.Column(scale=2):
|
|
|
235 |
Subject to change: currently exports a .csv with the following fields, you can
|
236 |
create a new note type with these fields to handle importing.:
|
237 |
<b>Index, Topic, Question, Answer, Explanation, Example</b>
|
238 |
+
"""
|
239 |
+
)
|
240 |
output = gr.Dataframe(
|
241 |
headers=[
|
242 |
"Index",
|