arpit13 commited on
Commit
71d248c
·
verified ·
1 Parent(s): 1643319

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -78,7 +78,7 @@ with gr.Blocks() as chat_interface:
78
  def update_subcategories(selected_main_category):
79
  """Update the subcategory dropdown based on the main category."""
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)
 
78
  def update_subcategories(selected_main_category):
79
  """Update the subcategory dropdown based on the main category."""
80
  new_subcategories = categories.get(selected_main_category, [])
81
+ return gr.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)