derek-thomas HF staff commited on
Commit
75695b2
1 Parent(s): 4246b36

Adding markdown.py and the FAQ

Browse files
Files changed (2) hide show
  1. app.py +4 -30
  2. markdown.py +40 -0
app.py CHANGED
@@ -5,6 +5,7 @@ from datetime import datetime
5
 
6
  from utilities import extract, create_time_series_features, train_model, process_personalized_collection, my_loss, \
7
  cleanup
 
8
  from memory_states import get_my_memory_states
9
  from plot import make_plot
10
 
@@ -88,36 +89,7 @@ with gr.Blocks() as demo:
88
  w_output = gr.Markdown()
89
  with gr.Tab("Instructions"):
90
  with gr.Box():
91
- gr.Markdown("""
92
- # How to get personalized FSRS Anki parameters
93
- If you have been using Anki for some time and have accumulated a lot of review logs, you can try this
94
- FSRS4Anki optimizer app to generate parameters for you.
95
-
96
- This is based on the amazing work of [Jarrett Ye](https://github.com/L-M-Sherlock). My goal is to further
97
- democratize this technology so anyone can use it!
98
- # Step 1 - Get the `Review Logs` to upload
99
- 1. Click the gear icon to the right of a deck’s name
100
- 2. Export
101
- 3. Check “Include scheduling information” and “Support older Anki versions”
102
- ![](https://miro.medium.com/v2/resize:fit:1400/format:webp/1*W3Nnfarki2z7Ukyom4kMuw.png)
103
- 4. Export and upload that file to the app
104
-
105
- # Step 2 - Get the `Next Day Starts At` parameter
106
- 1. Open preferences
107
- 2. Copy the next day starts at value and paste it in the app
108
- ![](https://miro.medium.com/v2/resize:fit:1072/format:webp/1*qAUb6ry8UxFeCsjnKLXvsQ.png)
109
-
110
- # Step 3 - Fill in the rest of the settings
111
- 1. Your `Time Zone`
112
- 2. `Advanced settings` if you know what you are doing
113
-
114
- # Step 4 - Click `Optimize your Anki!`
115
- 1. After it runs copy `var w = [...]`
116
- 2. Check out the analysis tab for more info
117
-
118
- # Step 5 - Update FSRS4Anki with the optimized parameters
119
- ![](https://miro.medium.com/v2/resize:fit:1252/format:webp/1*NM4CR-n7nDk3nQN1Bi30EA.png)
120
- """)
121
  with gr.Tab("Analysis"):
122
  with gr.Row():
123
  markdown_output = gr.Markdown()
@@ -125,6 +97,8 @@ with gr.Blocks() as demo:
125
  df_output = gr.DataFrame()
126
  plot_output = gr.Plot()
127
  files_output = gr.Files(label="Analysis Files")
 
 
128
 
129
  btn_plot.click(anki_optimizer,
130
  inputs=[file, timezone, next_day_starts_at, revlog_start_date, requestRetention, fast_mode_in],
 
5
 
6
  from utilities import extract, create_time_series_features, train_model, process_personalized_collection, my_loss, \
7
  cleanup
8
+ from markdown import instructions_markdown, faq_markdown
9
  from memory_states import get_my_memory_states
10
  from plot import make_plot
11
 
 
89
  w_output = gr.Markdown()
90
  with gr.Tab("Instructions"):
91
  with gr.Box():
92
+ gr.Markdown(instructions_markdown)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
  with gr.Tab("Analysis"):
94
  with gr.Row():
95
  markdown_output = gr.Markdown()
 
97
  df_output = gr.DataFrame()
98
  plot_output = gr.Plot()
99
  files_output = gr.Files(label="Analysis Files")
100
+ with gr.Tab("FAQ"):
101
+ gr.Markdown(faq_markdown)
102
 
103
  btn_plot.click(anki_optimizer,
104
  inputs=[file, timezone, next_day_starts_at, revlog_start_date, requestRetention, fast_mode_in],
markdown.py ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ instructions_markdown = """
2
+ # How to get personalized FSRS Anki parameters
3
+ If you have been using Anki for some time and have accumulated a lot of review logs, you can try this
4
+ FSRS4Anki optimizer app to generate parameters for you.
5
+
6
+ This is based on the amazing work of [Jarrett Ye](https://github.com/L-M-Sherlock). My goal is to further
7
+ democratize this technology so anyone can use it!
8
+ # Step 1 - Get the `Review Logs` to upload
9
+ 1. Click the gear icon to the right of a deck’s name
10
+ 2. Export
11
+ 3. Check “Include scheduling information” and “Support older Anki versions”
12
+ ![](https://miro.medium.com/v2/resize:fit:1400/format:webp/1*W3Nnfarki2z7Ukyom4kMuw.png)
13
+ 4. Export and upload that file to the app
14
+
15
+ # Step 2 - Get the `Next Day Starts At` parameter
16
+ 1. Open preferences
17
+ 2. Copy the next day starts at value and paste it in the app
18
+ ![](https://miro.medium.com/v2/resize:fit:1072/format:webp/1*qAUb6ry8UxFeCsjnKLXvsQ.png)
19
+
20
+ # Step 3 - Fill in the rest of the settings
21
+ 1. Your `Time Zone`
22
+ 2. `Advanced settings` if you know what you are doing
23
+
24
+ # Step 4 - Click `Optimize your Anki!`
25
+ 1. After it runs copy `var w = [...]`
26
+ 2. Check out the analysis tab for more info
27
+
28
+ # Step 5 - Update FSRS4Anki with the optimized parameters
29
+ ![](https://miro.medium.com/v2/resize:fit:1252/format:webp/1*NM4CR-n7nDk3nQN1Bi30EA.png)
30
+ """
31
+
32
+ faq_markdown = """
33
+ What is the original paper?
34
+
35
+ You can find it here: [https://www.maimemo.com/paper/](https://www.maimemo.com/paper/)
36
+
37
+ What is the original author's research story?
38
+
39
+ You can find it here: [https://medium.com/@JarrettYe/how-did-i-publish-a-paper-in-acmkdd-as-an-undergraduate-c0199baddf31](https://medium.com/@JarrettYe/how-did-i-publish-a-paper-in-acmkdd-as-an-undergraduate-c0199baddf31)
40
+ """