import DEFAULT_WEIGHT from fsrs_optimizer
Browse files
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=
|
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(
|