Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,14 +10,14 @@ def init_choices():
|
|
10 |
|
11 |
with gr.Blocks() as demo:
|
12 |
dropdown = gr.Dropdown(label="Select", multiselect=True, choices=["a0", "b0"])
|
13 |
-
|
14 |
|
15 |
demo.load(
|
16 |
fn=init_choices,
|
17 |
-
outputs=
|
18 |
).then(
|
19 |
-
fn=lambda
|
20 |
-
inputs=
|
21 |
outputs=dropdown,
|
22 |
)
|
23 |
|
|
|
10 |
|
11 |
with gr.Blocks() as demo:
|
12 |
dropdown = gr.Dropdown(label="Select", multiselect=True, choices=["a0", "b0"])
|
13 |
+
state = gr.State()
|
14 |
|
15 |
demo.load(
|
16 |
fn=init_choices,
|
17 |
+
outputs=state,
|
18 |
).then(
|
19 |
+
fn=lambda x: gr.Dropdown(choices=x),
|
20 |
+
inputs=state,
|
21 |
outputs=dropdown,
|
22 |
)
|
23 |
|