Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,9 +33,10 @@ def create_app():
|
|
| 33 |
# Xử lý cập nhật UI
|
| 34 |
def update_controls(filter_name):
|
| 35 |
updates = []
|
| 36 |
-
for
|
| 37 |
-
|
| 38 |
-
|
|
|
|
| 39 |
return updates
|
| 40 |
|
| 41 |
# Xử lý ảnh real-time
|
|
|
|
| 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
|