Parishri07 commited on
Commit
02b70e8
·
verified ·
1 Parent(s): 0807a82

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -73,10 +73,13 @@ with gr.Blocks(title="RetailGenie Navigator") as demo:
73
  )
74
 
75
  state.change(
76
- lambda c, s: gr.update(choices=get_subfolders(os.path.join(BASE_DIR, c, s)), value=None),
77
- inputs=[country, state],
78
- outputs=city
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),