arpit13 commited on
Commit
1643319
·
verified ·
1 Parent(s): 27488f0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -80,6 +80,7 @@ with gr.Blocks() as chat_interface:
80
  new_subcategories = categories.get(selected_main_category, [])
81
  return gr.Dropdown.update(choices=new_subcategories, value=new_subcategories[0] if new_subcategories else None)
82
 
 
83
  main_category.change(update_subcategories, inputs=main_category, outputs=sub_category)
84
 
85
  with gr.Row():
 
80
  new_subcategories = categories.get(selected_main_category, [])
81
  return gr.Dropdown.update(choices=new_subcategories, value=new_subcategories[0] if new_subcategories else None)
82
 
83
+ # Handle main category change to update subcategories
84
  main_category.change(update_subcategories, inputs=main_category, outputs=sub_category)
85
 
86
  with gr.Row():