Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Fix parenthesis.
Browse files- src/about.py +17 -17
src/about.py
CHANGED
@@ -132,38 +132,38 @@ WHAT_IS_F1_HTML = f"""
|
|
132 |
<script>
|
133 |
// This script needs to be run after the DOM is loaded.
|
134 |
// Gradio's gr.HTML component loads content dynamically, so we use a small delay.
|
135 |
-
setTimeout(() => {
|
136 |
const problemTabs = [
|
137 |
-
{ btn: document.getElementById('problem-tab-btn-warmup'), content: document.getElementById('problem-tab-content-warmup') },
|
138 |
-
{ btn: document.getElementById('problem-tab-btn-tier1'), content: document.getElementById('problem-tab-content-tier1') },
|
139 |
-
{ btn: document.getElementById('problem-tab-btn-tier2'), content: document.getElementById('problem-tab-content-tier2') }
|
140 |
];
|
141 |
|
142 |
const activeClasses = 'border-blue-600 text-blue-600';
|
143 |
const inactiveClasses = 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300';
|
144 |
|
145 |
-
problemTabs.forEach(tab => {
|
146 |
-
if(tab.btn) {
|
147 |
-
tab.btn.addEventListener('click', () => {
|
148 |
-
problemTabs.forEach(t => {
|
149 |
-
if(t.btn) {
|
150 |
t.btn.classList.remove(...activeClasses.split(' '));
|
151 |
t.btn.classList.add(...inactiveClasses.split(' '));
|
152 |
t.content.classList.add('hidden');
|
153 |
-
}
|
154 |
-
});
|
155 |
tab.btn.classList.add(...activeClasses.split(' '));
|
156 |
tab.btn.classList.remove(...inactiveClasses.split(' '));
|
157 |
tab.content.classList.remove('hidden');
|
158 |
-
});
|
159 |
-
}
|
160 |
-
});
|
161 |
|
162 |
// Set initial active tab
|
163 |
-
if (problemTabs.length > 0 && problemTabs[0].btn) {
|
164 |
problemTabs[0].btn.click();
|
165 |
-
}
|
166 |
-
}, 100); // 100ms delay to ensure elements are in the DOM
|
167 |
</script>
|
168 |
</body>
|
169 |
</html>
|
|
|
132 |
<script>
|
133 |
// This script needs to be run after the DOM is loaded.
|
134 |
// Gradio's gr.HTML component loads content dynamically, so we use a small delay.
|
135 |
+
setTimeout(() => {{
|
136 |
const problemTabs = [
|
137 |
+
{{ btn: document.getElementById('problem-tab-btn-warmup'), content: document.getElementById('problem-tab-content-warmup') }},
|
138 |
+
{{ btn: document.getElementById('problem-tab-btn-tier1'), content: document.getElementById('problem-tab-content-tier1') }},
|
139 |
+
{{ btn: document.getElementById('problem-tab-btn-tier2'), content: document.getElementById('problem-tab-content-tier2') }}
|
140 |
];
|
141 |
|
142 |
const activeClasses = 'border-blue-600 text-blue-600';
|
143 |
const inactiveClasses = 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300';
|
144 |
|
145 |
+
problemTabs.forEach(tab => {{
|
146 |
+
if(tab.btn) {{
|
147 |
+
tab.btn.addEventListener('click', () => {{
|
148 |
+
problemTabs.forEach(t => {{
|
149 |
+
if(t.btn) {{
|
150 |
t.btn.classList.remove(...activeClasses.split(' '));
|
151 |
t.btn.classList.add(...inactiveClasses.split(' '));
|
152 |
t.content.classList.add('hidden');
|
153 |
+
}}
|
154 |
+
}});
|
155 |
tab.btn.classList.add(...activeClasses.split(' '));
|
156 |
tab.btn.classList.remove(...inactiveClasses.split(' '));
|
157 |
tab.content.classList.remove('hidden');
|
158 |
+
}});
|
159 |
+
}}
|
160 |
+
}});
|
161 |
|
162 |
// Set initial active tab
|
163 |
+
if (problemTabs.length > 0 && problemTabs[0].btn) {{
|
164 |
problemTabs[0].btn.click();
|
165 |
+
}}
|
166 |
+
}}, 100); // 100ms delay to ensure elements are in the DOM
|
167 |
</script>
|
168 |
</body>
|
169 |
</html>
|