eienmojiki commited on
Commit
d6c463b
·
verified ·
1 Parent(s): 89e53eb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -33,10 +33,9 @@ def create_app():
33
  # Xử lý cập nhật UI
34
  def update_controls(filter_name):
35
  updates = []
36
- for filter_name_ctrl, filter_ctrl_list in controls.items(): # Correctly unpack key-value pairs
37
- visibility = filter_name_ctrl == filter_name
38
- for component in filter_ctrl_list: # Iterate through the list of controls
39
- updates.append(gr.update(visible=visibility)) # Update visibility for each control
40
  return updates
41
 
42
  # Xử lý ảnh real-time
 
33
  # Xử lý cập nhật UI
34
  def update_controls(filter_name):
35
  updates = []
36
+ for filter_ctrl_name, ctrl_group in controls.items(): # controls now stores groups
37
+ visibility = True # Always make visible
38
+ updates.append(gr.update(visible=visibility)) # Update visibility of the group
 
39
  return updates
40
 
41
  # Xử lý ảnh real-time