HAL1993 commited on
Commit
48c06ad
·
verified ·
1 Parent(s): 4354afc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +33 -14
app.py CHANGED
@@ -304,7 +304,7 @@ def create_demo():
304
  box-sizing: border-box !important;
305
  display: block !important;
306
  }
307
- input, textarea {
308
  background: #000000 !important;
309
  color: #FFFFFF !important;
310
  border: 1px solid #FFFFFF !important; /* White border */
@@ -313,8 +313,28 @@ def create_demo():
313
  width: 100% !important;
314
  max-width: 100vw !important;
315
  box-sizing: border-box !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
316
  }
317
- input:hover, textarea:hover {
 
 
 
 
318
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3) !important;
319
  transition: box-shadow 0.3s;
320
  }
@@ -393,10 +413,14 @@ def create_demo():
393
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3) !important;
394
  border: 0.5px solid #FFFFFF !important; /* Thinner white border */
395
  }
 
 
 
 
396
  }
397
  </style>
398
  <script>
399
- // Debug: Log container dimensions, glow, background, border, and radio styles
400
  document.addEventListener('DOMContentLoaded', () => {
401
  const containers = document.querySelectorAll('#general_items, #input_column, .image-container');
402
  containers.forEach(container => {
@@ -410,15 +434,10 @@ def create_demo():
410
  const style = window.getComputedStyle(runButton);
411
  console.log(`Run button: box-shadow=${style.boxShadow}, background=${style.background}, border=${style.border}, animation=${style.animation}, background-position=${style.backgroundPosition}`);
412
  }
413
- const radio = document.querySelector('.gr-radio');
414
- if (radio) {
415
- const style = window.getComputedStyle(radio);
416
- const labels = radio.querySelectorAll('label');
417
- console.log(`Radio (default): border=${style.border}, background=${style.background}, color=${style.color}, display=${style.display}, flex-wrap=${style.flexWrap || 'none'}`);
418
- labels.forEach((label, index) => {
419
- const labelStyle = window.getComputedStyle(label);
420
- console.log(`Radio label ${index}: text=${label.textContent}, border=${labelStyle.border}, padding=${labelStyle.padding}, font=${labelStyle.fontFamily}`);
421
- });
422
  }
423
  // Hide any technical output containers
424
  const outputContainers = document.querySelectorAll('.gr-prose, .gr-log, .progress-text, .gr-progress');
@@ -439,11 +458,11 @@ def create_demo():
439
  lines=3,
440
  elem_classes=["gradio-component"]
441
  )
442
- aspect_ratio = gr.Radio(
443
  label="Aspect Ratio (width:height)",
444
  choices=["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3"],
445
  value="1:1",
446
- elem_classes=[] # No custom classes to ensure default Gradio styling
447
  )
448
  run_button = gr.Button(
449
  "Generate",
 
304
  box-sizing: border-box !important;
305
  display: block !important;
306
  }
307
+ input, textarea, select {
308
  background: #000000 !important;
309
  color: #FFFFFF !important;
310
  border: 1px solid #FFFFFF !important; /* White border */
 
313
  width: 100% !important;
314
  max-width: 100vw !important;
315
  box-sizing: border-box !important;
316
+ font-family: 'Orbitron', sans-serif;
317
+ }
318
+ input:hover, textarea:hover, select:hover {
319
+ box-shadow: 0 0 8px rgba(255, 255, 255, 0.3) !important;
320
+ transition: box-shadow 0.3s;
321
+ }
322
+ .gr-dropdown select {
323
+ background: #000000 !important;
324
+ color: #FFFFFF !important;
325
+ border: 1px solid #FFFFFF !important;
326
+ border-radius: 4px;
327
+ padding: 0.5rem;
328
+ font-family: 'Orbitron', sans-serif;
329
+ width: 100% !important;
330
+ max-width: 100vw !important;
331
+ box-sizing: border-box !important;
332
  }
333
+ .gr-dropdown select option {
334
+ background: #000000 !important;
335
+ color: #FFFFFF !important;
336
+ }
337
+ .gr-dropdown select:hover {
338
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3) !important;
339
  transition: box-shadow 0.3s;
340
  }
 
413
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3) !important;
414
  border: 0.5px solid #FFFFFF !important; /* Thinner white border */
415
  }
416
+ .gr-dropdown select {
417
+ padding: 0.4rem !important;
418
+ font-size: 0.9rem !important;
419
+ }
420
  }
421
  </style>
422
  <script>
423
+ // Debug: Log container dimensions, glow, background, border, and dropdown styles
424
  document.addEventListener('DOMContentLoaded', () => {
425
  const containers = document.querySelectorAll('#general_items, #input_column, .image-container');
426
  containers.forEach(container => {
 
434
  const style = window.getComputedStyle(runButton);
435
  console.log(`Run button: box-shadow=${style.boxShadow}, background=${style.background}, border=${style.border}, animation=${style.animation}, background-position=${style.backgroundPosition}`);
436
  }
437
+ const dropdown = document.querySelector('.gr-dropdown select');
438
+ if (dropdown) {
439
+ const style = window.getComputedStyle(dropdown);
440
+ console.log(`Dropdown: border=${style.border}, background=${style.background}, color=${style.color}, font=${style.fontFamily}, padding=${style.padding}`);
 
 
 
 
 
441
  }
442
  // Hide any technical output containers
443
  const outputContainers = document.querySelectorAll('.gr-prose, .gr-log, .progress-text, .gr-progress');
 
458
  lines=3,
459
  elem_classes=["gradio-component"]
460
  )
461
+ aspect_ratio = gr.Dropdown(
462
  label="Aspect Ratio (width:height)",
463
  choices=["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3"],
464
  value="1:1",
465
+ elem_classes=["gradio-component"]
466
  )
467
  run_button = gr.Button(
468
  "Generate",