Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app/ui.py
Browse files
app/ui.py
CHANGED
|
@@ -110,37 +110,37 @@ with gr.Blocks(css=CSS + """
|
|
| 110 |
</div>
|
| 111 |
""")
|
| 112 |
|
| 113 |
-
# Add modal control JavaScript
|
| 114 |
-
app.load(None, None, js="""
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
""")
|
|
|
|
| 110 |
</div>
|
| 111 |
""")
|
| 112 |
|
| 113 |
+
# # Add modal control JavaScript
|
| 114 |
+
# app.load(None, None, js="""
|
| 115 |
+
# function() {
|
| 116 |
+
# function toggleModal(show) {
|
| 117 |
+
# document.querySelector('.shortcuts-modal').classList.toggle('show', show);
|
| 118 |
+
# document.querySelector('.modal-backdrop').classList.toggle('show', show);
|
| 119 |
+
# }
|
| 120 |
|
| 121 |
+
# document.addEventListener('keydown', function(e) {
|
| 122 |
+
# // Only handle shortcuts when not typing in an input
|
| 123 |
+
# if (document.activeElement.tagName === 'INPUT' ||
|
| 124 |
+
# document.activeElement.tagName === 'TEXTAREA') {
|
| 125 |
+
# return;
|
| 126 |
+
# }
|
| 127 |
|
| 128 |
+
# // Check for shift + / or ? key
|
| 129 |
+
# if ((e.key === '/' && e.shiftKey) || e.key === '?') {
|
| 130 |
+
# toggleModal(true);
|
| 131 |
+
# }
|
| 132 |
+
# // Check for escape key
|
| 133 |
+
# else if (e.key === 'Escape') {
|
| 134 |
+
# toggleModal(false);
|
| 135 |
+
# }
|
| 136 |
+
# });
|
| 137 |
|
| 138 |
+
# // Close modal when clicking backdrop
|
| 139 |
+
# document.querySelector('.modal-backdrop').addEventListener('click', function() {
|
| 140 |
+
# toggleModal(false);
|
| 141 |
+
# });
|
| 142 |
|
| 143 |
+
# // Make toggleModal available globally
|
| 144 |
+
# window.toggleModal = toggleModal;
|
| 145 |
+
# }
|
| 146 |
+
# """)
|