openfree commited on
Commit
d41bebe
·
verified ·
1 Parent(s): c56d510

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +63 -33
app.py CHANGED
@@ -185,13 +185,15 @@ h1 {
185
  letter-spacing: -0.5px !important;
186
  }
187
 
188
- /* Card styling */
189
- .gr-box, .gr-form, .gr-panel {
190
  border-radius: var(--border-radius) !important;
191
  box-shadow: 0 8px 16px var(--shadow-color) !important;
192
  background-color: var(--card-background) !important;
193
  border: none !important;
194
  overflow: hidden !important;
 
 
195
  }
196
 
197
  /* Button styling */
@@ -227,24 +229,35 @@ input:focus, select:focus, textarea:focus, .gr-input:focus {
227
  }
228
 
229
  /* Slider styling */
230
- .gr-slider {
231
- --slider-color: var(--primary-color) !important;
 
 
 
 
 
232
  }
233
 
234
- .gr-slider-handle {
235
- background-color: white !important;
236
- border: 2px solid var(--primary-color) !important;
 
 
 
 
 
237
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
238
  }
239
 
240
  /* Dropdown styling */
241
- .gr-dropdown {
242
  background-color: white !important;
243
  border: 2px solid #e0e0e0 !important;
244
  border-radius: 8px !important;
 
245
  }
246
 
247
- .gr-dropdown option {
248
  padding: 10px !important;
249
  }
250
 
@@ -298,7 +311,7 @@ body::before {
298
  }
299
 
300
  /* Label styling */
301
- label {
302
  font-weight: 600 !important;
303
  color: #673ab7 !important;
304
  margin-bottom: 5px !important;
@@ -313,46 +326,60 @@ label {
313
  gap: 15px !important;
314
  }
315
 
316
- .gr-form > *, .gr-box > * {
317
  margin-bottom: 16px !important;
318
  }
319
 
320
- /* Update Examples section */
321
- .gr-examples {
 
 
 
 
 
 
 
 
 
322
  background-color: #f3e5f5 !important;
323
  border-radius: var(--border-radius) !important;
324
  padding: 15px !important;
325
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05) !important;
326
  }
327
 
328
- .gr-examples h2 {
329
  color: #7b1fa2 !important;
330
  font-size: 1.5rem !important;
331
  margin-bottom: 15px !important;
332
  }
333
 
334
- /* Dropdown menu adjustments */
335
- .gr-dropdowns {
336
- display: flex !important;
337
- gap: 10px !important;
338
- }
339
-
340
- /* Status messages */
341
- .gr-status {
342
- border-radius: 8px !important;
343
- padding: 10px 15px !important;
344
  }
345
 
346
- .gr-info {
347
- background-color: var(--secondary-color) !important;
 
 
 
 
348
  }
349
 
350
- .gr-warning {
351
- background-color: var(--warning-color) !important;
 
 
 
 
 
 
352
  }
353
 
354
- .gr-error {
355
- background-color: #ffcdd2 !important;
356
  }
357
  """
358
 
@@ -392,7 +419,8 @@ def create_demo():
392
 
393
  with gr.Row():
394
  with gr.Column(scale=6):
395
- with gr.Box(elem_id="input-panel"):
 
396
  gr.Markdown("### 📸 Reference Images")
397
  with gr.Row():
398
  with gr.Column():
@@ -433,7 +461,8 @@ def create_demo():
433
  gr.HTML(_CITE_)
434
 
435
  with gr.Column(scale=6):
436
- with gr.Box(elem_id="output-panel"):
 
437
  gr.Markdown("### 🖼️ Generated Result")
438
  output_image = gr.Image(label="Generated Image", elem_id="output-image", format='png')
439
  seed_output = gr.Textbox(label="Used Seed", elem_id="seed-output")
@@ -444,7 +473,8 @@ def create_demo():
444
  elem_id="debug-gallery",
445
  )
446
 
447
- with gr.Box(elem_id="examples-panel"):
 
448
  gr.Markdown("## 📚 Examples")
449
  example_inps = [
450
  [
 
185
  letter-spacing: -0.5px !important;
186
  }
187
 
188
+ /* Card styling for panels */
189
+ .panel-box {
190
  border-radius: var(--border-radius) !important;
191
  box-shadow: 0 8px 16px var(--shadow-color) !important;
192
  background-color: var(--card-background) !important;
193
  border: none !important;
194
  overflow: hidden !important;
195
+ padding: 20px !important;
196
+ margin-bottom: 20px !important;
197
  }
198
 
199
  /* Button styling */
 
229
  }
230
 
231
  /* Slider styling */
232
+ .gr-form input[type=range] {
233
+ appearance: none !important;
234
+ width: 100% !important;
235
+ height: 6px !important;
236
+ background: #e0e0e0 !important;
237
+ border-radius: 5px !important;
238
+ outline: none !important;
239
  }
240
 
241
+ .gr-form input[type=range]::-webkit-slider-thumb {
242
+ appearance: none !important;
243
+ width: 16px !important;
244
+ height: 16px !important;
245
+ background: var(--primary-color) !important;
246
+ border-radius: 50% !important;
247
+ cursor: pointer !important;
248
+ border: 2px solid white !important;
249
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
250
  }
251
 
252
  /* Dropdown styling */
253
+ .gr-form select {
254
  background-color: white !important;
255
  border: 2px solid #e0e0e0 !important;
256
  border-radius: 8px !important;
257
+ padding: 10px 15px !important;
258
  }
259
 
260
+ .gr-form select option {
261
  padding: 10px !important;
262
  }
263
 
 
311
  }
312
 
313
  /* Label styling */
314
+ .gr-form label {
315
  font-weight: 600 !important;
316
  color: #673ab7 !important;
317
  margin-bottom: 5px !important;
 
326
  gap: 15px !important;
327
  }
328
 
329
+ .gr-form > div {
330
  margin-bottom: 16px !important;
331
  }
332
 
333
+ /* Headings */
334
+ .gr-form h3 {
335
+ color: #7b1fa2 !important;
336
+ margin-top: 5px !important;
337
+ margin-bottom: 15px !important;
338
+ border-bottom: 2px solid #e1bee7 !important;
339
+ padding-bottom: 8px !important;
340
+ }
341
+
342
+ /* Examples section */
343
+ #examples-panel {
344
  background-color: #f3e5f5 !important;
345
  border-radius: var(--border-radius) !important;
346
  padding: 15px !important;
347
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05) !important;
348
  }
349
 
350
+ #examples-panel h2 {
351
  color: #7b1fa2 !important;
352
  font-size: 1.5rem !important;
353
  margin-bottom: 15px !important;
354
  }
355
 
356
+ /* Accordion styling */
357
+ .gr-accordion {
358
+ border: 1px solid #e0e0e0 !important;
359
+ border-radius: var(--border-radius) !important;
360
+ overflow: hidden !important;
 
 
 
 
 
361
  }
362
 
363
+ .gr-accordion summary {
364
+ padding: 12px 16px !important;
365
+ background-color: #f9f9f9 !important;
366
+ cursor: pointer !important;
367
+ font-weight: 600 !important;
368
+ color: #673ab7 !important;
369
  }
370
 
371
+ /* Generate button special styling */
372
+ #generate-btn {
373
+ background: linear-gradient(135deg, #ff9a9e, #fad0c4) !important;
374
+ font-size: 1.1rem !important;
375
+ padding: 12px 24px !important;
376
+ margin-top: 10px !important;
377
+ margin-bottom: 15px !important;
378
+ width: 100% !important;
379
  }
380
 
381
+ #generate-btn:hover {
382
+ background: linear-gradient(135deg, #fad0c4, #ff9a9e) !important;
383
  }
384
  """
385
 
 
419
 
420
  with gr.Row():
421
  with gr.Column(scale=6):
422
+ # Input panel - using a Group div with custom class instead of Box
423
+ with gr.Group(elem_id="input-panel", elem_classes="panel-box"):
424
  gr.Markdown("### 📸 Reference Images")
425
  with gr.Row():
426
  with gr.Column():
 
461
  gr.HTML(_CITE_)
462
 
463
  with gr.Column(scale=6):
464
+ # Output panel - using a Group div with custom class instead of Box
465
+ with gr.Group(elem_id="output-panel", elem_classes="panel-box"):
466
  gr.Markdown("### 🖼️ Generated Result")
467
  output_image = gr.Image(label="Generated Image", elem_id="output-image", format='png')
468
  seed_output = gr.Textbox(label="Used Seed", elem_id="seed-output")
 
473
  elem_id="debug-gallery",
474
  )
475
 
476
+ # Examples panel - using a Group div with custom class instead of Box
477
+ with gr.Group(elem_id="examples-panel", elem_classes="panel-box"):
478
  gr.Markdown("## 📚 Examples")
479
  example_inps = [
480
  [