Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -73,10 +73,13 @@ with gr.Blocks(title="RetailGenie Navigator") as demo:
|
|
73 |
)
|
74 |
|
75 |
state.change(
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
)
|
|
|
|
|
|
|
80 |
|
81 |
city.change(
|
82 |
lambda c, s, ci: gr.update(choices=get_subfolders(os.path.join(BASE_DIR, c, s, ci)), value=None),
|
|
|
73 |
)
|
74 |
|
75 |
state.change(
|
76 |
+
lambda c, s: (
|
77 |
+
print(f"🔽 Selected state: {s} under country: {c}"),
|
78 |
+
gr.update(choices=get_subfolders(os.path.join(BASE_DIR, c, s)), value=None)
|
79 |
+
)[1],
|
80 |
+
inputs=[country, state],
|
81 |
+
outputs=city
|
82 |
+
)
|
83 |
|
84 |
city.change(
|
85 |
lambda c, s, ci: gr.update(choices=get_subfolders(os.path.join(BASE_DIR, c, s, ci)), value=None),
|