Spaces:
Running
Running
Commit
·
54f4fee
1
Parent(s):
fd32459
Refactor filter documentation handling
Browse files- Removed redundant `gr.update` call
- Simplified documentation return value
- Cleaned up code formatting
- Maintained existing functionality
- Improved code readability
app.py
CHANGED
|
@@ -46,9 +46,8 @@ def create_app():
|
|
| 46 |
|
| 47 |
# Get filter documentation
|
| 48 |
doc = registry.filters[filter_name].__doc__ or "No documentation available."
|
| 49 |
-
updates.append(gr.update(value=doc))
|
| 50 |
|
| 51 |
-
return updates + [
|
| 52 |
|
| 53 |
|
| 54 |
# Xử lý ảnh khi button click
|
|
@@ -79,7 +78,7 @@ def create_app():
|
|
| 79 |
filter_select.change(
|
| 80 |
update_controls,
|
| 81 |
inputs=filter_select,
|
| 82 |
-
outputs=list(filter_groups.values()) + [filter_doc],
|
| 83 |
api_name=False
|
| 84 |
)
|
| 85 |
|
|
|
|
| 46 |
|
| 47 |
# Get filter documentation
|
| 48 |
doc = registry.filters[filter_name].__doc__ or "No documentation available."
|
|
|
|
| 49 |
|
| 50 |
+
return updates + [doc]
|
| 51 |
|
| 52 |
|
| 53 |
# Xử lý ảnh khi button click
|
|
|
|
| 78 |
filter_select.change(
|
| 79 |
update_controls,
|
| 80 |
inputs=filter_select,
|
| 81 |
+
outputs=list(filter_groups.values()) + [filter_doc], # Pass list of groups as outputs
|
| 82 |
api_name=False
|
| 83 |
)
|
| 84 |
|