udpate gradio sdk to 4.36.0
Browse files
README.md
CHANGED
@@ -4,7 +4,7 @@ emoji: π
|
|
4 |
colorFrom: purple
|
5 |
colorTo: gray
|
6 |
sdk: gradio
|
7 |
-
sdk_version:
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: mit
|
|
|
4 |
colorFrom: purple
|
5 |
colorTo: gray
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 4.36.0
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: mit
|
app.py
CHANGED
@@ -19,7 +19,7 @@ def interface_func(
|
|
19 |
ratings.replace(" ", ""), request_retention
|
20 |
)
|
21 |
default_preview = optimizer.preview(request_retention)
|
22 |
-
if delta_ts:
|
23 |
s_history, d_history = memory_state_sequence(ratings, delta_ts, optimizer.w)
|
24 |
return (
|
25 |
test_sequence,
|
@@ -44,27 +44,25 @@ def memory_state_sequence(
|
|
44 |
iface = gr.Interface(
|
45 |
fn=interface_func,
|
46 |
inputs=[
|
47 |
-
gr.
|
48 |
label="weights",
|
49 |
lines=1,
|
50 |
-
|
51 |
),
|
52 |
-
gr.
|
53 |
-
gr.
|
54 |
-
|
55 |
-
),
|
56 |
-
gr.inputs.Slider(
|
57 |
label="Your Request Retention",
|
58 |
minimum=0.6,
|
59 |
maximum=0.97,
|
60 |
step=0.01,
|
61 |
-
|
62 |
),
|
63 |
],
|
64 |
outputs=[
|
65 |
-
gr.
|
66 |
-
gr.
|
67 |
-
gr.
|
68 |
],
|
69 |
)
|
70 |
|
|
|
19 |
ratings.replace(" ", ""), request_retention
|
20 |
)
|
21 |
default_preview = optimizer.preview(request_retention)
|
22 |
+
if delta_ts != "":
|
23 |
s_history, d_history = memory_state_sequence(ratings, delta_ts, optimizer.w)
|
24 |
return (
|
25 |
test_sequence,
|
|
|
44 |
iface = gr.Interface(
|
45 |
fn=interface_func,
|
46 |
inputs=[
|
47 |
+
gr.Textbox(
|
48 |
label="weights",
|
49 |
lines=1,
|
50 |
+
value=str(DEFAULT_WEIGHT)[1:-1],
|
51 |
),
|
52 |
+
gr.Textbox(label="ratings", lines=1, value="3,3,3,3,1,3,3"),
|
53 |
+
gr.Textbox(label="delta_ts (requried by state history)", lines=1, value=""),
|
54 |
+
gr.Slider(
|
|
|
|
|
55 |
label="Your Request Retention",
|
56 |
minimum=0.6,
|
57 |
maximum=0.97,
|
58 |
step=0.01,
|
59 |
+
value=0.9,
|
60 |
),
|
61 |
],
|
62 |
outputs=[
|
63 |
+
gr.Textbox(label="test sequences"),
|
64 |
+
gr.Textbox(label="default preview"),
|
65 |
+
gr.Textbox(label="state history (require delta_ts)"),
|
66 |
],
|
67 |
)
|
68 |
|