K00B404 commited on
Commit
cb17e06
1 Parent(s): 6e3c28c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -37
app.py CHANGED
@@ -224,43 +224,6 @@ title_html="""
224
  <h1 id="title-text">FLUX Capacitor</h1>
225
  </div>
226
  </center>
227
-
228
- <script>
229
- function gradioApp() {
230
- const gradioShadowRoot = document.getElementsByTagName('gradio-app')[0].shadowRoot;
231
- return gradioShadowRoot.getElementById('component-0') || document;
232
- }
233
-
234
- function adjustBackground() {
235
- const accordion = gradioApp().querySelector('.gradio-accordion');
236
- const container = gradioApp().querySelector('.gradio-container');
237
-
238
- if (accordion && accordion.classList.contains('open')) {
239
- container.style.backgroundSize = '900px 2100px'; // When accordion is open
240
- } else {
241
- container.style.backgroundSize = '900px 880px'; // When accordion is closed
242
- }
243
- }
244
-
245
- // Initial background size based on initial state
246
- document.addEventListener('DOMContentLoaded', () => {
247
- adjustBackground();
248
-
249
- // Use MutationObserver to watch for changes in the accordion's class
250
- const observer = new MutationObserver((mutations) => {
251
- mutations.forEach((mutation) => {
252
- if (mutation.type === 'attributes' && mutation.attributeName === 'class') {
253
- adjustBackground();
254
- }
255
- });
256
- });
257
-
258
- const accordion = gradioApp().querySelector('.gradio-accordion');
259
- if (accordion) {
260
- observer.observe(accordion, { attributes: true });
261
- }
262
- });
263
- </script>
264
  """
265
 
266
  css = """
 
224
  <h1 id="title-text">FLUX Capacitor</h1>
225
  </div>
226
  </center>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
227
  """
228
 
229
  css = """