JarrettYe commited on
Commit
d1dba50
·
verified ·
1 Parent(s): 1fd95e7

import DEFAULT_WEIGHT from fsrs_optimizer

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,7 +5,7 @@ import sys
5
  if os.environ.get("DEV_MODE"):
6
  # for local development
7
  sys.path.insert(0, os.path.abspath("../fsrs-optimizer/src/fsrs_optimizer/"))
8
- from fsrs_optimizer import Optimizer
9
 
10
 
11
  def interface_func(weights: str, ratings: str, request_retention: float) -> str:
@@ -25,7 +25,7 @@ iface = gr.Interface(
25
  gr.inputs.Textbox(
26
  label="weights",
27
  lines=1,
28
- default="0.4, 0.9, 2.3, 10.9, 4.93, 0.94, 0.86, 0.01, 1.49, 0.14, 0.94, 2.18, 0.05, 0.34, 1.26, 0.29, 2.61",
29
  ),
30
  gr.inputs.Textbox(label="ratings", lines=1, default="3,3,3,3,1,3,3"),
31
  gr.inputs.Slider(
 
5
  if os.environ.get("DEV_MODE"):
6
  # for local development
7
  sys.path.insert(0, os.path.abspath("../fsrs-optimizer/src/fsrs_optimizer/"))
8
+ from fsrs_optimizer import Optimizer, DEFAULT_WEIGHT
9
 
10
 
11
  def interface_func(weights: str, ratings: str, request_retention: float) -> str:
 
25
  gr.inputs.Textbox(
26
  label="weights",
27
  lines=1,
28
+ default=str(DEFAULT_WEIGHT)[1:-1],
29
  ),
30
  gr.inputs.Textbox(label="ratings", lines=1, default="3,3,3,3,1,3,3"),
31
  gr.inputs.Slider(